]> icculus.org git repositories - dana/openbox.git/blob - src/client.hh
keep track of struts for each desktop
[dana/openbox.git] / src / client.hh
1 // -*- mode: C++; indent-tabs-mode: nil; c-basic-offset: 2; -*-
2 #ifndef   __client_hh
3 #define   __client_hh
4
5 /*! @file client.hh
6   @brief The Client class maintains the state of a client window by handling
7   property changes on the window and some client messages
8 */
9
10 #include "screen.hh"
11 #include "otk/strut.hh"
12 #include "otk/rect.hh"
13 #include "otk/eventhandler.hh"
14 #include "otk/ustring.hh"
15
16 extern "C" {
17 #include <X11/Xlib.h>
18
19 #ifdef    SHAPE
20 #include <X11/extensions/shape.h>
21 #endif // SHAPE
22 }
23
24 #include <string>
25 #include <list>
26
27 namespace ob {
28
29 class Frame;
30 class Screen;
31
32 //! The MWM Hints as retrieved from the window property
33 /*!
34   This structure only contains 3 elements, even though the Motif 2.0
35   structure contains 5. We only use the first 3, so that is all gets defined.
36 */
37 struct MwmHints {
38   unsigned long flags;      //!< A bitmask of Client::MwmFlags values
39   unsigned long functions;  //!< A bitmask of Client::MwmFunctions values
40   unsigned long decorations;//!< A bitmask of Client::MwmDecorations values
41   //! The number of elements in the Client::MwmHints struct
42   static const unsigned int elements = 3;
43 };
44
45 //! Maintains the state of a client window.
46 /*!
47   Client maintains the state of a client window. The state consists of the
48   hints that the application sets on the window, such as the title, or window
49   gravity.
50   <p>
51   Client also manages client messages for the client window. When the
52   application (or any application) requests something to be changed for the
53   client, it will call the ActionHandler (for client messages) or update the
54   class' member variables and call whatever is nessary to complete the
55   change (such as causing a redraw of the titlebar after the title is changed).
56 */
57 class Client : public otk::EventHandler {
58 public:
59
60   //! The frame window which decorates around the client window
61   /*!
62     NOTE: This should NEVER be used inside the client class's constructor!
63   */
64   Frame *frame;
65
66   //! Holds a list of Clients
67   typedef std::list<Client*> List;
68
69   //! The possible stacking layers a client window can be a part of
70   enum StackLayer {
71     Layer_Icon,       //!< 0 - iconified windows, in any order at all
72     Layer_Desktop,    //!< 1 - desktop windows
73     Layer_Below,      //!< 2 - normal windows w/ below
74     Layer_Normal,     //!< 3 - normal windows
75     Layer_Above,      //!< 4 - normal windows w/ above
76     Layer_Top,        //!< 5 - always-on-top-windows (docks?)
77     Layer_Fullscreen, //!< 6 - fullscreeen windows
78     Layer_Internal,   //!< 7 - openbox windows/menus
79     NUM_LAYERS
80   };
81
82   //! Corners of the client window, used for anchor positions
83   enum Corner { TopLeft,
84                 TopRight,
85                 BottomLeft,
86                 BottomRight };
87
88   //! Possible window types
89   enum WindowType { Type_Desktop, //!< A desktop (bottom-most window)
90                     Type_Dock,    //!< A dock bar/panel window
91                     Type_Toolbar, //!< A toolbar window, pulled off an app
92                     Type_Menu,    //!< An unpinned menu from an app
93                     Type_Utility, //!< A small utility window such as a palette
94                     Type_Splash,  //!< A splash screen window
95                     Type_Dialog,  //!< A dialog window
96                     Type_Normal   //!< A normal application window
97   };
98
99   //! Possible flags for MWM Hints (defined by Motif 2.0)
100   enum MwmFlags { MwmFlag_Functions   = 1 << 0, //!< The MMW Hints define funcs
101                   MwmFlag_Decorations = 1 << 1  //!< The MWM Hints define decor
102   };
103
104   //! Possible functions for MWM Hints (defined by Motif 2.0)
105   enum MwmFunctions { MwmFunc_All      = 1 << 0, //!< All functions
106                       MwmFunc_Resize   = 1 << 1, //!< Allow resizing
107                       MwmFunc_Move     = 1 << 2, //!< Allow moving
108                       MwmFunc_Iconify  = 1 << 3, //!< Allow to be iconfied
109                       MwmFunc_Maximize = 1 << 4  //!< Allow to be maximized
110                       //MwmFunc_Close    = 1 << 5 //!< Allow to be closed
111   };
112
113   //! Possible decorations for MWM Hints (defined by Motif 2.0)
114   enum MemDecorations { MwmDecor_All      = 1 << 0, //!< All decorations
115                         MwmDecor_Border   = 1 << 1, //!< Show a border
116                         MwmDecor_Handle   = 1 << 2, //!< Show a handle (bottom)
117                         MwmDecor_Title    = 1 << 3, //!< Show a titlebar
118                         //MwmDecor_Menu     = 1 << 4, //!< Show a menu
119                         MwmDecor_Iconify  = 1 << 5, //!< Show an iconify button
120                         MwmDecor_Maximize = 1 << 6  //!< Show a maximize button
121   };
122
123   //! The things the user can do to the client window
124   enum Function { Func_Resize     = 1 << 0, //!< Allow resizing
125                   Func_Move       = 1 << 1, //!< Allow moving
126                   Func_Iconify    = 1 << 2, //!< Allow to be iconified
127                   Func_Maximize   = 1 << 3, //!< Allow to be maximized
128                   Func_Shade      = 1 << 4, //!< Allow to be shaded
129                   Func_Fullscreen = 1 << 5, //!< Allow to be made fullscreen
130                   Func_Close      = 1 << 6  //!< Allow to be closed
131   };
132   //! Holds a bitmask of Client::Function values
133   typedef unsigned char FunctionFlags;
134
135   //! The decorations the client window wants to be displayed on it
136   enum Decoration { Decor_Titlebar    = 1 << 0, //!< Display a titlebar
137                     Decor_Handle      = 1 << 1, //!< Display a handle (bottom)
138                     Decor_Border      = 1 << 2, //!< Display a border
139                     Decor_Iconify     = 1 << 3, //!< Display an iconify button
140                     Decor_Maximize    = 1 << 4, //!< Display a maximize button
141                     //! Display a button to toggle the window's placement on
142                     //! all desktops
143                     Decor_AllDesktops = 1 << 5,
144                     Decor_Close       = 1 << 6  //!< Display a close button
145   };
146   //! Holds a bitmask of Client::Decoration values
147   typedef unsigned char DecorationFlags;
148
149   //! Possible actions that can be made with the _NET_WM_STATE client message
150   enum StateAction { State_Remove = 0, //!< _NET_WM_STATE_REMOVE
151                      State_Add,        //!< _NET_WM_STATE_ADD
152                      State_Toggle      //!< _NET_WM_STATE_TOGGLE
153   };
154
155   //! The event mask to grab on client windows
156   static const long event_mask = PropertyChangeMask | FocusChangeMask |
157                                  StructureNotifyMask;
158
159   //! The mask of events to not let propogate past the client
160   /*!
161     This makes things like xprop work on the client window, but means we have
162     to explicitly grab clicks that we want.
163   */
164   static const long no_propagate_mask = ButtonPressMask | ButtonReleaseMask |
165                                         ButtonMotionMask;
166
167   //! The desktop value which indicated the window is iconified and not on any
168   //! desktop
169   static const long ICONIC_DESKTOP = 0xfffffffe;
170
171   //! The number of unmap events to ignore on the window
172   int ignore_unmaps;
173   
174 private:
175   //! The screen number on which the client resides
176   int      _screen;
177   
178   //! The actual window that this class is wrapping up
179   Window   _window;
180
181   //! The id of the group the window belongs to
182   Window   _group;
183
184   //! The client which this client is a transient (child) for
185   Client *_transient_for;
186
187   //! The clients which are transients (children) of this client
188   Client::List _transients;
189
190   //! The desktop on which the window resides (0xffffffff for all desktops)
191   long _desktop;
192
193   //! The last desktop to which the window belonged, mostly useful when the
194   //! window is iconified, to see where it used to be.
195   long _old_desktop;
196
197   //! Normal window title
198   otk::ustring  _title;
199   //! Window title when iconifiged
200   otk::ustring  _icon_title;
201
202   //! The application that created the window
203   std::string  _app_name;
204   //! The class of the window, can used for grouping
205   std::string  _app_class;
206   //! The specified role of the window, used for identification
207   std::string  _role;
208
209   //! The type of window (what its function is)
210   WindowType   _type;
211
212   //! Position and size of the window
213   /*!
214     This will not always be the actual position of the window on screen, it is
215     rather, the position requested by the client, to which the window's gravity
216     is applied.
217   */
218   otk::Rect    _area;
219
220   //! The window's strut
221   /*!
222     The strut defines areas of the screen that are marked off-bounds for window
223     placement. In theory, where this window exists.
224   */
225   otk::Strut   _strut;
226
227   //! The logical size of the window
228   /*!
229     The "logical" size of the window is refers to the user's perception of the
230     size of the window, and is the value that should be displayed to the user.
231     For example, with xterms, this value it the number of characters being
232     displayed in the terminal, instead of the number of pixels.
233   */
234   otk::Size   _logical_size;
235
236   //! Width of the border on the window.
237   /*!
238     The window manager will set this to 0 while the window is being managed,
239     but needs to restore it afterwards, so it is saved here.
240   */
241   int _border_width;
242
243   //! The minimum aspect ratio the client window can be sized to.
244   /*!
245     A value of 0 means this is ignored.
246   */
247   float _min_ratio;
248   //! The maximum aspect ratio the client window can be sized to.
249   /*!
250     A value of 0 means this is ignored.
251   */
252   float _max_ratio;
253   
254   //! The minimum size of the client window
255   /*!
256     If the min is > the max, then the window is not resizable
257   */
258   otk::Size _min_size;
259   //! The maximum size of the client window
260   /*!
261     If the min is > the max, then the window is not resizable
262   */
263   otk::Size _max_size;
264   //! The size of increments to resize the client window by
265   otk::Size _size_inc;
266   //! The base size of the client window
267   /*!
268     This value should be subtracted from the window's actual size when
269     displaying its size to the user, or working with its min/max size
270   */
271   otk::Size _base_size;
272
273   //! Window decoration and functionality hints
274   MwmHints _mwmhints;
275   
276   //! Where to place the decorated window in relation to the undecorated window
277   int _gravity;
278
279   //! The state of the window, one of WithdrawnState, IconicState, or
280   //! NormalState
281   long _wmstate;
282
283   //! True if the client supports the delete_window protocol
284   bool _delete_window;
285   
286   //! Was the window's position requested by the application? if not, we should
287   //! place the window ourselves when it first appears
288   bool _positioned;
289   
290   //! Can the window receive input focus?
291   bool _can_focus;
292   //! Urgency flag
293   bool _urgent;
294   //! Notify the window when it receives focus?
295   bool _focus_notify;
296   //! Does the client window have the input focus?
297   bool _focused;
298
299   //! The window uses shape extension to be non-rectangular?
300   bool _shaped;
301
302   //! The window is modal, so it must be processed before any windows it is
303   //! related to can be focused
304   bool _modal;
305   //! Only the window's titlebar is displayed
306   bool _shaded;
307   //! The window is iconified
308   bool _iconic;
309   //! The window is maximized to fill the screen vertically
310   bool _max_vert;
311   //! The window is maximized to fill the screen horizontally
312   bool _max_horz;
313   //! The window should not be displayed by pagers
314   bool _skip_pager;
315   //! The window should not be displayed by taskbars
316   bool _skip_taskbar;
317   //! The window is a 'fullscreen' window, and should be on top of all others
318   bool _fullscreen;
319   //! The window should be on top of other windows of the same type
320   bool _above;
321   //! The window should be underneath other windows of the same type
322   bool _below;
323
324   StackLayer _layer;
325
326   //! A bitmask of values in the Client::Decoration enum
327   /*!
328     The values in the variable are the decorations that the client wants to be
329     displayed around it.
330   */
331   DecorationFlags _decorations;
332
333   //! A bitmask of values in the Client::Decoration enum.
334   /*!
335     Specifies the decorations that should NOT be displayed on the client.
336   */
337   DecorationFlags _disabled_decorations;
338
339   //! A bitmask of values in the Client::Function enum
340   /*!
341     The values in the variable specify the ways in which the user is allowed to
342     modify this window.
343   */
344   FunctionFlags _functions;
345
346   //! Retrieves the window's initial gravity
347   void getGravity();
348   //! Retrieves the desktop hint's value and sets Client::_desktop
349   void getDesktop();
350   //! Retrieves the window's type and sets Client::_type
351   void getType();
352   //! Gets the MWM Hints and adjusts Client::_functions and
353   //! Client::_decorations
354   void getMwmHints();
355   //! Gets the position and size of the window and sets Client::_area
356   void getArea();
357   //! Gets the net_state hint and sets the boolean flags for any states set in
358   //! the hint
359   void getState();
360   //! Determines if the window uses the Shape extension and sets
361   //! Client::_shaped
362   void getShaped();
363
364   //! Set up what decor should be shown on the window and what functions should
365   //! be allowed (Client::_decorations and Client::_functions).
366   /*!
367     This also updates the NET_WM_ALLOWED_ACTIONS hint.
368   */
369   void setupDecorAndFunctions();
370   
371   //! Sets the wm_state to the specified value
372   void setWMState(long state);
373   //! Adjusts the window's net_state
374   /*!
375     This should not be called as part of the window mapping process! It is for
376     use when updating the state post-mapping.<br>
377     Client::applyStartupState is used to do the same things during the mapping
378     process.
379   */
380   void setState(StateAction action, long data1, long data2);
381
382   //! Sends the window to the specified desktop
383   /*!
384     A window is iconified by sending it to the ICONIC_DESKTOP, and restored
385     by sending it to any other valid desktop.
386   */
387   void setDesktop(long desktop);
388   
389   //! Calculates the stacking layer for the client window
390   void calcLayer();
391
392   //! Update the protocols that the window supports and adjusts things if they
393   //! change
394   void updateProtocols();
395   //! Updates the WMNormalHints and adjusts things if they change
396   void updateNormalHints();
397   //! Updates the WMHints and adjusts things if they change
398   /*!
399     @param initstate Whether to read the initial_state property from the
400                      WMHints. This should only be used during the mapping
401                      process.
402   */
403   void updateWMHints(bool initstate = false);
404   //! Updates the window's title
405   void updateTitle();
406   //! Updates the window's icon title
407   void updateIconTitle();
408   //! Updates the window's application name and class
409   void updateClass();
410   //! Updates the strut for the client
411   void updateStrut();
412   //! Updates the window's transient status, and any parents of it
413   void updateTransientFor();
414
415   //! Change the client's state hints to match the class' data
416   void changeState();
417   //! Change the allowed actions set on the client
418   void changeAllowedActions();
419
420   //! Request the client to close its window.
421   void close();
422
423   //! Shades or unshades the client window
424   /*!
425     @param shade true if the window should be shaded; false if it should be
426                  unshaded.
427   */
428   void shade(bool shade);
429
430   //! Recursively searches the client 'tree' for a modal client, always skips
431   //! the topmost node (the window you're starting with).
432   Client *Client::searchModalTree(Client *node, Client *skip);
433
434   //! Fires the urgent callbacks which lets the user do what they want with
435   //! urgent windows
436   void fireUrgent();
437   
438   //! Fullscreen's or unfullscreen's the client window
439   /*!
440     @param fs true if the window should be made fullscreen; false if it should
441               be returned to normal state.
442     @param savearea true to have the client's current size and position saved;
443                     otherwise, they are not. You should not save when mapping a
444                     new window that is set to fullscreen. This has no effect
445                     when restoring a window from fullscreen.
446   */
447   void fullscreen(bool fs, bool savearea = true);
448
449   //! Maximize or unmaximize the client window
450   /*!
451     @param max true if the window should be maximized; false if it should be
452                returned to normal size.
453     @param dir 0 to set both horz and vert, 1 to set horz, 2 to set vert.
454     @param savearea true to have the client's current size and position saved;
455                     otherwise, they are not. You should not save when mapping a
456                     new window that is set to fullscreen. This has no effect
457                     when unmaximizing a window.
458   */
459   void maximize(bool max, int dir, bool savearea = true);
460
461   //! Internal version of the Client::move function
462   /*!
463     @param x The X coordinate to move to.
464     @param y The Y coordinate to move to.
465   */
466   void internal_move(int x, int y);
467   //! Internal version of the Client::resize function
468   /*!
469     This also maintains things like the client's minsize, and size increments.
470     @param anchor The corner to keep in the same position when resizing.
471     @param w The width component of the new size for the client.
472     @param h The height component of the new size for the client.
473     @param user Specifies whether this is a user-requested change or a
474                 program requested change.
475     @param x An optional X coordinate to which the window will be moved
476              after resizing.
477     @param y An optional Y coordinate to which the window will be moved
478              after resizing.
479     The x and y coordinates must both be sepcified together, or they will have
480     no effect. When they are specified, the anchor is ignored.
481   */
482   void internal_resize(Corner anchor, int w, int h,
483                        bool user = true, int x = INT_MIN, int y = INT_MIN);
484
485   //! Removes or reapplies the client's border to its window
486   /*!
487     Used when managing and unmanaging a window.
488     @param addborder true if adding the border to the client; false if removing
489                      from the client
490   */
491   void toggleClientBorder(bool addborder);
492
493   //! Applies the states requested when the window mapped
494   /*!
495     This should be called only once, during the window mapping process. It
496     applies things like maximized, and fullscreen.
497   */
498   void applyStartupState();
499   
500 public:
501 #ifndef SWIG
502   //! Constructs a new Client object around a specified window id
503   /*!
504 BB    @param window The window id that the Client class should handle
505     @param screen The screen on which the window resides
506   */
507   Client(int screen, Window window);
508   //! Destroys the Client object
509   virtual ~Client();
510 #endif
511
512   //! Returns the screen on which the clien resides
513   inline int screen() const { return _screen; }
514   
515   //! Returns the window id that the Client object is handling
516   inline Window window() const { return _window; }
517
518   //! Returns the type of the window, one of the Client::WindowType values
519   inline WindowType type() const { return _type; }
520   //! Returns if the window should be treated as a normal window.
521   /*!
522     Some windows (desktops, docks, splash screens) have special rules applied
523     to them in a number of places regarding focus or user interaction.
524   */
525   inline bool normal() const {
526     return ! (_type == Type_Desktop || _type == Type_Dock ||
527               _type == Type_Splash);
528   }
529   
530   //! Returns the desktop on which the window resides
531   /*!
532     This value is a 0-based index.<br>
533     A value of 0xffffffff indicates that the window exists on all desktops.
534   */
535   inline long desktop() const { return _desktop; }
536   //! Returns the window's title
537   inline const otk::ustring &title() const { return _title; }
538   //! Returns the window's title when it is iconified
539   inline const otk::ustring &iconTitle() const { return _title; }
540   //! Returns the application's name to whom the window belongs
541   inline const std::string &appName() const { return _app_name; }
542   //! Returns the class of the window
543   inline const std::string &appClass() const { return _app_class; }
544   //! Returns the program-specified role of the window
545   inline const std::string &role() const { return _role; }
546   //! Returns if the window can be focused
547   /*!
548     @return true if the window can receive focus; otherwise, false
549   */
550   inline bool canFocus() const { return _can_focus; }
551   //! Returns if the window has indicated that it needs urgent attention
552   inline bool urgent() const { return _urgent; }
553   //! Returns if the window wants to be notified when it receives focus
554   inline bool focusNotify() const { return _focus_notify; }
555   //! Returns if the window is the focused window
556   inline bool focused() const { return _focused; }
557   //! Returns if the window uses the Shape extension
558   inline bool shaped() const { return _shaped; }
559   //! Returns the window's gravity
560   /*!
561     This value determines where to place the decorated window in relation to
562     its position without decorations.<br>
563     One of: NorthWestGravity, SouthWestGravity, EastGravity, ...,
564     SouthGravity, StaticGravity, ForgetGravity
565   */
566   inline int gravity() const { return _gravity; }
567   //! Returns if the application requested the initial position for the window
568   /*!
569     If the application did not request a position (this function returns false)
570     then the window should be placed intelligently by the window manager
571     initially
572   */
573   inline bool positionRequested() const { return _positioned; }
574   //! Returns the decorations that the client window wishes to be displayed on
575   //! it
576   inline DecorationFlags decorations() const { return _decorations; }
577   //! Returns the decorations that the user has requested to be disabled on the
578   //! client
579   inline DecorationFlags disabledDecorations() const
580     { return _disabled_decorations; }
581   //! Returns the functions that the user can perform on the window
582   inline FunctionFlags funtions() const { return _functions; }
583
584   //! Return the client this window is transient for
585   inline Client *transientFor() const { return _transient_for; }
586
587   //! Returns if the window is modal
588   /*!
589     If the window is modal, then no other windows that it is related to can get
590     focus while it exists/remains modal.
591   */
592   inline bool modal() const { return _modal; }
593   //! The window should not be displayed by pagers
594   inline bool skipPager() const { return _skip_pager; }
595   //! The window should not be displayed by taskbars
596   inline bool skipTaskbar() const { return _skip_taskbar; } 
597  //! Returns if the window is shaded
598   /*!
599     When the window is shaded, only its titlebar is visible.
600   */
601   inline bool shaded() const { return _shaded; }
602   //! Returns if the window is in fullscreen mode
603   inline bool fullscreen() const { return _fullscreen; }
604   //! Returns if the window is iconified
605   /*!
606     When the window is iconified, it is not visible at all (except in iconbars/
607     panels/etc that want to show lists of iconified windows
608   */
609   inline bool iconic() const { return _iconic; }
610   //! Returns if the window is maximized vertically
611   inline bool maxVert() const { return _max_vert; }
612   //! Returns if the window is maximized horizontally
613   inline bool maxHorz() const { return _max_horz; }
614   //! Returns the window's stacking layer
615   inline StackLayer layer() const { return _layer; }
616
617   //! Returns the logical size of the window
618   /*!
619     The "logical" size of the window is refers to the user's perception of the
620     size of the window, and is the value that should be displayed to the user.
621     For example, with xterms, this value it the number of characters being
622     displayed in the terminal, instead of the number of pixels.
623   */
624   const otk::Size &logicalSize() const { return _logical_size; }
625
626   //! Returns the position and size of the client relative to the root window
627   inline const otk::Rect &area() const { return _area; }
628
629   //! Returns the client's strut definition
630   inline const otk::Strut &strut() const { return _strut; }
631
632   //! Move the window (actually, its frame) to a position.
633   /*!
634     This moves the window so that the top-left corner of its frame will be at
635     the position specified.
636     @param x The X coordinate to move to.
637     @param y The Y coordinate to move to.
638   */
639   void move(int x, int y);
640   
641   //! Resizes the client window, anchoring it in a given corner
642   /*!
643     This also maintains things like the client's minsize, and size increments.
644     @param anchor The corner to keep in the same position when resizing.
645     @param w The width component of the new size for the client.
646     @param h The height component of the new size for the client.
647   */
648   void resize(Corner anchor, int w, int h);
649
650   //! Reapplies the maximized state to the window
651   /*!
652     Use this to make the window readjust its maximized size to new
653     surroundings (struts, etc).
654   */
655   void remaximize();
656   
657   //! Choose a mask of decorations to not display on the client
658   /*!
659     Pass a value of 0 to the function to turn all decorations back on. Note
660     that you cannot add decorations to a window with this, you can only remove
661     decorations that would otherwise have been displayed.
662     @param flags The mask of values from Client::Decoration to specify which
663                  decorations should not be displayed.
664   */
665   void disableDecorations(DecorationFlags flags);
666   
667   //! Return a modal child of the client window
668   /*!
669     @return A modal child of the client window, or 0 if none was found.
670   */
671   Client *findModalChild();
672
673   //! Attempt to focus the client window
674   bool focus();
675
676   //! Remove focus from the client window
677   void unfocus() const;
678
679   //! Validate client, by making sure no Destroy or Unmap events exist in
680   //! the event queue for the window.
681   /*!
682     @return true if the client is valid; false if the client has already
683             been unmapped/destroyed, and so is invalid.
684   */
685   bool validate() const;
686
687   void installColormap(bool install) const;
688   
689   virtual void focusHandler(const XFocusChangeEvent &e);
690   virtual void unfocusHandler(const XFocusChangeEvent &e);
691   virtual void propertyHandler(const XPropertyEvent &e);
692   virtual void clientMessageHandler(const XClientMessageEvent &e);
693   virtual void configureRequestHandler(const XConfigureRequestEvent &e);
694   virtual void unmapHandler(const XUnmapEvent &e);
695   virtual void destroyHandler(const XDestroyWindowEvent &e);
696   virtual void reparentHandler(const XReparentEvent &e);
697   virtual void mapRequestHandler(const XMapRequestEvent &e);
698 #if defined(SHAPE)
699   virtual void shapeHandler(const XShapeEvent &e);
700 #endif // SHAPE
701
702   friend void Screen::manageWindow(Window);
703   friend void Screen::unmanageWindow(Client *);
704 };
705
706 }
707
708 #endif // __client_hh