client: Ignore transient_for causing loops (FS#1124)
[awesome.git] / globalconf.h
blobca8c4a3f62602fb12000290851dcee92c08aec91
1 /*
2 * globalconf.h - basic globalconf.header
4 * Copyright © 2007-2009 Julien Danjou <julien@danjou.info>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
22 #ifndef AWESOME_GLOBALCONF_H
23 #define AWESOME_GLOBALCONF_H
25 #define SN_API_NOT_YET_FROZEN
26 #include <libsn/sn.h>
28 #include <glib.h>
30 #include <xcb/xcb_icccm.h>
31 #include <xcb/xcb_keysyms.h>
32 #include <xcb/xcb_cursor.h>
34 #include "objects/key.h"
35 #include "color.h"
36 #include "common/xembed.h"
37 #include "common/buffer.h"
39 #define ROOT_WINDOW_EVENT_MASK \
40 (const uint32_t []) { \
41 XCB_EVENT_MASK_SUBSTRUCTURE_REDIRECT | XCB_EVENT_MASK_SUBSTRUCTURE_NOTIFY \
42 | XCB_EVENT_MASK_ENTER_WINDOW \
43 | XCB_EVENT_MASK_LEAVE_WINDOW \
44 | XCB_EVENT_MASK_STRUCTURE_NOTIFY \
45 | XCB_EVENT_MASK_BUTTON_PRESS \
46 | XCB_EVENT_MASK_BUTTON_RELEASE \
47 | XCB_EVENT_MASK_FOCUS_CHANGE \
48 | XCB_EVENT_MASK_PROPERTY_CHANGE \
51 typedef struct drawable_t drawable_t;
52 typedef struct drawin_t drawin_t;
53 typedef struct a_screen screen_t;
54 typedef struct button_t button_t;
55 typedef struct widget_t widget_t;
56 typedef struct client_t client_t;
57 typedef struct tag tag_t;
59 ARRAY_TYPE(button_t *, button)
60 ARRAY_TYPE(tag_t *, tag)
61 ARRAY_TYPE(screen_t, screen)
62 ARRAY_TYPE(client_t *, client)
63 ARRAY_TYPE(drawin_t *, drawin)
65 /** Main configuration structure */
66 typedef struct
68 /** Connection ref */
69 xcb_connection_t *connection;
70 /** Default screen number */
71 int default_screen;
72 /** xcb-cursor context */
73 xcb_cursor_context_t *cursor_ctx;
74 /** Keys symbol table */
75 xcb_key_symbols_t *keysyms;
76 /** Logical screens */
77 screen_array_t screens;
78 /** Root window key bindings */
79 key_array_t keys;
80 /** Root window mouse bindings */
81 button_array_t buttons;
82 /** Modifiers masks */
83 uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
84 /** Check for XTest extension */
85 bool have_xtest;
86 /** Clients list */
87 client_array_t clients;
88 /** Embedded windows */
89 xembed_window_array_t embedded;
90 /** Stack client history */
91 client_array_t stack;
92 /** Lua VM state */
93 lua_State *L;
94 /** All errors messages from loading config files */
95 buffer_t startup_errors;
96 /** main loop that awesome is running on */
97 GMainLoop *loop;
98 /** The key grabber function */
99 int keygrabber;
100 /** The mouse pointer grabber function */
101 int mousegrabber;
102 /** Input focus information */
103 struct
105 /** Focused client */
106 client_t *client;
107 /** Is there a focus change pending? */
108 bool need_update;
109 } focus;
110 /** Drawins */
111 drawin_array_t drawins;
112 /** The startup notification display struct */
113 SnDisplay *sndisplay;
114 /** Latest timestamp we got from the X server */
115 xcb_timestamp_t timestamp;
116 /** Window that contains the systray */
117 struct
119 xcb_window_t window;
120 /** Systray window parent */
121 drawin_t *parent;
122 } systray;
123 /** The monitor of startup notifications */
124 SnMonitorContext *snmonitor;
125 /** The visual, used to draw */
126 xcb_visualtype_t *visual;
127 /** The screen's default visual */
128 xcb_visualtype_t *default_visual;
129 /** The screen's information */
130 xcb_screen_t *screen;
131 /** A graphic context. */
132 xcb_gcontext_t gc;
133 /** Our default depth */
134 uint8_t default_depth;
135 /** Our default color map */
136 xcb_colormap_t default_cmap;
137 /** Do we have to reban clients? */
138 bool need_lazy_banning;
139 /** Tag list */
140 tag_array_t tags;
141 } awesome_t;
143 extern awesome_t globalconf;
145 #endif
146 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80