]> Dogcows Code - chaz/openbox/blob - openbox/focus.h
add more options for focus fallback, use an enum for all the types of fallbacks.
[chaz/openbox] / openbox / focus.h
1 #ifndef __focus_h
2 #define __focus_h
3
4 #include <X11/Xlib.h>
5 #include <glib.h>
6
7 struct Client;
8
9 /*! The window which gets focus when nothing else will be focused */
10 extern Window focus_backup;
11
12 /*! The client which is currently focused */
13 extern struct Client *focus_client;
14
15 /*! The recent focus order on each desktop */
16 extern GList **focus_order;
17
18 /*! Should new windows be focused */
19 extern gboolean focus_new;
20 /*! Focus windows when the mouse enters them */
21 extern gboolean focus_follow;
22
23 void focus_startup();
24 void focus_shutdown();
25
26 /*! Specify which client is currently focused, this doesn't actually
27 send focus anywhere, its called by the Focus event handlers */
28 void focus_set_client(struct Client *client);
29
30 typedef enum {
31 Fallback_Desktop, /* switching desktops */
32 Fallback_Unfocusing, /* forcefully remove focus from the curernt window */
33 Fallback_NoFocus /* nothing has focus for some reason */
34 } FallbackType;
35
36 /*! Call this when you need to focus something! */
37 void focus_fallback(FallbackType type);
38
39 /*! Cycle focus amongst windows
40 Returns the Client to which focus has been cycled, or NULL if none. */
41 struct Client *focus_cycle(gboolean forward, gboolean linear, gboolean done,
42 gboolean cancel);
43
44 #endif
This page took 0.040547 seconds and 5 git commands to generate.