Only set client's urgent after startup
[awesome.git] / globalconf.h
blob608ee85167e5db91a1b7274f6fb8930e818a266d
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;
58 typedef struct xproperty xproperty_t;
60 ARRAY_TYPE(button_t *, button)
61 ARRAY_TYPE(tag_t *, tag)
62 ARRAY_TYPE(screen_t, screen)
63 ARRAY_TYPE(client_t *, client)
64 ARRAY_TYPE(drawin_t *, drawin)
65 ARRAY_TYPE(xproperty_t, xproperty)
67 /** Main configuration structure */
68 typedef struct
70 /** Connection ref */
71 xcb_connection_t *connection;
72 /** Default screen number */
73 int default_screen;
74 /** xcb-cursor context */
75 xcb_cursor_context_t *cursor_ctx;
76 /** Keys symbol table */
77 xcb_key_symbols_t *keysyms;
78 /** Logical screens */
79 screen_array_t screens;
80 /** Root window key bindings */
81 key_array_t keys;
82 /** Root window mouse bindings */
83 button_array_t buttons;
84 /** Modifiers masks */
85 uint16_t numlockmask, shiftlockmask, capslockmask, modeswitchmask;
86 /** Check for XTest extension */
87 bool have_xtest;
88 /** Check for SHAPE extension */
89 bool have_shape;
90 /** Clients list */
91 client_array_t clients;
92 /** Embedded windows */
93 xembed_window_array_t embedded;
94 /** Stack client history */
95 client_array_t stack;
96 /** Lua VM state */
97 lua_State *L;
98 /** All errors messages from loading config files */
99 buffer_t startup_errors;
100 /** main loop that awesome is running on */
101 GMainLoop *loop;
102 /** The key grabber function */
103 int keygrabber;
104 /** The mouse pointer grabber function */
105 int mousegrabber;
106 /** Input focus information */
107 struct
109 /** Focused client */
110 client_t *client;
111 /** Is there a focus change pending? */
112 bool need_update;
113 } focus;
114 /** Drawins */
115 drawin_array_t drawins;
116 /** The startup notification display struct */
117 SnDisplay *sndisplay;
118 /** Latest timestamp we got from the X server */
119 xcb_timestamp_t timestamp;
120 /** Window that contains the systray */
121 struct
123 xcb_window_t window;
124 /** Systray window parent */
125 drawin_t *parent;
126 } systray;
127 /** The monitor of startup notifications */
128 SnMonitorContext *snmonitor;
129 /** The visual, used to draw */
130 xcb_visualtype_t *visual;
131 /** The screen's default visual */
132 xcb_visualtype_t *default_visual;
133 /** The screen's information */
134 xcb_screen_t *screen;
135 /** A graphic context. */
136 xcb_gcontext_t gc;
137 /** Our default depth */
138 uint8_t default_depth;
139 /** Our default color map */
140 xcb_colormap_t default_cmap;
141 /** Do we have to reban clients? */
142 bool need_lazy_banning;
143 /** Tag list */
144 tag_array_t tags;
145 /** List of registered xproperties */
146 xproperty_array_t xproperties;
147 } awesome_t;
149 extern awesome_t globalconf;
151 #endif
152 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:textwidth=80