Gentoo Archives: gentoo-commits

From: "Matsuu Takuto (matsuu)" <matsuu@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-wm/awesome/files: 3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
Date: Wed, 27 Apr 2011 11:14:44
Message-Id: 20110427111434.C0B7220057@flycatcher.gentoo.org
1 matsuu 11/04/27 11:14:34
2
3 Added:
4 3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
5 Log:
6 Fixed building with xcb-util >= 0.3.8 wrt #364987. Removed old versions..
7
8 (Portage version: 2.1.9.46/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 x11-wm/awesome/files/3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/x11-wm/awesome/files/3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch?rev=1.1&content-type=text/plain
15
16 Index: 3.4-0001-Update-the-code-following-release-of-xcb-util-0.3.8.patch
17 ===================================================================
18 From 33e140552786f20a34c15852e88aaa27f3bed029 Mon Sep 17 00:00:00 2001
19 From: Arnaud Fontaine <arnau@××××××.org>
20 Date: Wed, 27 Apr 2011 15:44:35 +0900
21 Subject: [PATCH] Update the code following release of xcb-util 0.3.8.
22
23 xcb-util is now split into several repositories since 0.3.8. This
24 release also cleaned up the API a lot, thus update the code
25 accordingly.
26
27 Signed-off-by: Arnaud Fontaine <arnau@××××××.org>
28 ---
29 awesome.c | 2 +-
30 awesomeConfig.cmake | 7 ++---
31 client.c | 56 +++++++++++++++++++++---------------------
32 client.h | 6 ++--
33 common/xutil.c | 1 -
34 event.c | 10 +++---
35 ewmh.c | 4 +-
36 property.c | 68 +++++++++++++++++++++++++-------------------------
37 selection.c | 14 +++++-----
38 systray.c | 2 +-
39 window.c | 4 +-
40 11 files changed, 86 insertions(+), 88 deletions(-)
41
42 diff --git a/awesome.c b/awesome.c
43 index f89080c..1258b4c 100644
44 --- a/awesome.c
45 +++ b/awesome.c
46 @@ -154,7 +154,7 @@ scan(void)
47
48 if(!attr_r || attr_r->override_redirect
49 || attr_r->map_state == XCB_MAP_STATE_UNMAPPED
50 - || state == XCB_WM_STATE_WITHDRAWN)
51 + || state == XCB_ICCCM_WM_STATE_WITHDRAWN)
52 {
53 geom_wins[i] = NULL;
54 p_delete(&attr_r);
55 diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake
56 index 68b5ee3..5672afc 100644
57 --- a/awesomeConfig.cmake
58 +++ b/awesomeConfig.cmake
59 @@ -127,7 +127,7 @@ execute_process(
60
61 # Use pkgconfig to get most of the libraries
62 pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED
63 - xcb>=1.4)
64 + xcb>=1.6)
65
66 pkg_check_modules(AWESOME_REQUIRED REQUIRED
67 glib-2.0
68 @@ -139,10 +139,9 @@ pkg_check_modules(AWESOME_REQUIRED REQUIRED
69 xcb-xtest
70 xcb-xinerama
71 xcb-shape
72 - xcb-aux>=0.3.0
73 - xcb-atom>=0.3.0
74 + xcb-util>=0.3.8
75 xcb-keysyms>=0.3.4
76 - xcb-icccm>=0.3.6
77 + xcb-icccm>=0.3.8
78 xcb-image>=0.3.0
79 cairo-xcb
80 libstartup-notification-1.0>=0.10
81 diff --git a/client.c b/client.c
82 index 049e3d5..baae69f 100644
83 --- a/client.c
84 +++ b/client.c
85 @@ -52,7 +52,7 @@ luaA_client_gc(lua_State *L)
86 client_t *c = luaA_checkudata(L, 1, &client_class);
87 button_array_wipe(&c->buttons);
88 key_array_wipe(&c->keys);
89 - xcb_get_wm_protocols_reply_wipe(&c->protocols);
90 + xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
91 p_delete(&c->machine);
92 p_delete(&c->class);
93 p_delete(&c->instance);
94 @@ -94,21 +94,21 @@ client_set_urgent(lua_State *L, int cidx, bool urgent)
95 if(c->urgent != urgent)
96 {
97 xcb_get_property_cookie_t hints =
98 - xcb_get_wm_hints_unchecked(globalconf.connection, c->window);
99 + xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window);
100
101 c->urgent = urgent;
102 ewmh_client_update_hints(c);
103
104 /* update ICCCM hints */
105 - xcb_wm_hints_t wmh;
106 - xcb_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
107 + xcb_icccm_wm_hints_t wmh;
108 + xcb_icccm_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
109
110 if(urgent)
111 - wmh.flags |= XCB_WM_HINT_X_URGENCY;
112 + wmh.flags |= XCB_ICCCM_WM_HINT_X_URGENCY;
113 else
114 - wmh.flags &= ~XCB_WM_HINT_X_URGENCY;
115 + wmh.flags &= ~XCB_ICCCM_WM_HINT_X_URGENCY;
116
117 - xcb_set_wm_hints(globalconf.connection, c->window, &wmh);
118 + xcb_icccm_set_wm_hints(globalconf.connection, c->window, &wmh);
119
120 hook_property(c, "urgent");
121 luaA_object_emit_signal(L, cidx, "property::urgent", 0);
122 @@ -721,7 +721,7 @@ HANDLE_GEOM(height)
123 *
124 * At this stage it's just safer to keep it in normal state and avoid confusion.
125 */
126 - window_state_set(c->window, XCB_WM_STATE_NORMAL);
127 + window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
128
129 if(!startup)
130 {
131 @@ -767,14 +767,14 @@ client_geometry_hints(client_t *c, area_t geometry)
132 int32_t real_basew = 0, real_baseh = 0;
133
134 /* base size is substituted with min size if not specified */
135 - if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
136 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
137 {
138 basew = c->size_hints.base_width;
139 baseh = c->size_hints.base_height;
140 real_basew = basew;
141 real_baseh = baseh;
142 }
143 - else if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
144 + else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
145 {
146 basew = c->size_hints.min_width;
147 baseh = c->size_hints.min_height;
148 @@ -783,12 +783,12 @@ client_geometry_hints(client_t *c, area_t geometry)
149 basew = baseh = 0;
150
151 /* min size is substituted with base size if not specified */
152 - if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
153 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
154 {
155 minw = c->size_hints.min_width;
156 minh = c->size_hints.min_height;
157 }
158 - else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
159 + else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
160 {
161 minw = c->size_hints.base_width;
162 minh = c->size_hints.base_height;
163 @@ -796,7 +796,7 @@ client_geometry_hints(client_t *c, area_t geometry)
164 else
165 minw = minh = 0;
166
167 - if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT
168 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT
169 && c->size_hints.min_aspect_den > 0
170 && c->size_hints.max_aspect_den > 0
171 && geometry.height - real_baseh > 0
172 @@ -838,7 +838,7 @@ client_geometry_hints(client_t *c, area_t geometry)
173 if(minh)
174 geometry.height = MAX(geometry.height, minh);
175
176 - if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
177 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
178 {
179 if(c->size_hints.max_width)
180 geometry.width = MIN(geometry.width, c->size_hints.max_width);
181 @@ -846,7 +846,7 @@ client_geometry_hints(client_t *c, area_t geometry)
182 geometry.height = MIN(geometry.height, c->size_hints.max_height);
183 }
184
185 - if(c->size_hints.flags & (XCB_SIZE_HINT_P_RESIZE_INC | XCB_SIZE_HINT_BASE_SIZE)
186 + if(c->size_hints.flags & (XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_BASE_SIZE)
187 && c->size_hints.width_inc && c->size_hints.height_inc)
188 {
189 uint16_t t1 = geometry.width, t2 = geometry.height;
190 @@ -969,9 +969,9 @@ client_set_minimized(lua_State *L, int cidx, bool s)
191 c->minimized = s;
192 banning_need_update((c)->screen);
193 if(s)
194 - window_state_set(c->window, XCB_WM_STATE_ICONIC);
195 + window_state_set(c->window, XCB_ICCCM_WM_STATE_ICONIC);
196 else
197 - window_state_set(c->window, XCB_WM_STATE_NORMAL);
198 + window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
199 ewmh_client_update_hints(c);
200 if(strut_has_value(&c->strut))
201 screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0);
202 @@ -1333,7 +1333,7 @@ client_unmanage(client_t *c)
203
204 /* Do this last to avoid races with clients. According to ICCCM, clients
205 * arent allowed to re-use the window until after this. */
206 - window_state_set(c->window, XCB_WM_STATE_WITHDRAWN);
207 + window_state_set(c->window, XCB_ICCCM_WM_STATE_WITHDRAWN);
208
209 /* set client as invalid */
210 c->invalid = true;
211 @@ -2052,9 +2052,9 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
212
213 lua_createtable(L, 0, 1);
214
215 - if(c->size_hints.flags & XCB_SIZE_HINT_US_POSITION)
216 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION)
217 u_or_p = "user_position";
218 - else if(c->size_hints.flags & XCB_SIZE_HINT_P_POSITION)
219 + else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION)
220 u_or_p = "program_position";
221
222 if(u_or_p)
223 @@ -2068,9 +2068,9 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
224 u_or_p = NULL;
225 }
226
227 - if(c->size_hints.flags & XCB_SIZE_HINT_US_SIZE)
228 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_SIZE)
229 u_or_p = "user_size";
230 - else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
231 + else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
232 u_or_p = "program_size";
233
234 if(u_or_p)
235 @@ -2083,7 +2083,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
236 lua_setfield(L, -2, u_or_p);
237 }
238
239 - if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
240 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
241 {
242 lua_pushnumber(L, c->size_hints.min_width);
243 lua_setfield(L, -2, "min_width");
244 @@ -2091,7 +2091,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
245 lua_setfield(L, -2, "min_height");
246 }
247
248 - if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
249 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
250 {
251 lua_pushnumber(L, c->size_hints.max_width);
252 lua_setfield(L, -2, "max_width");
253 @@ -2099,7 +2099,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
254 lua_setfield(L, -2, "max_height");
255 }
256
257 - if(c->size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)
258 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)
259 {
260 lua_pushnumber(L, c->size_hints.width_inc);
261 lua_setfield(L, -2, "width_inc");
262 @@ -2107,7 +2107,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
263 lua_setfield(L, -2, "height_inc");
264 }
265
266 - if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT)
267 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT)
268 {
269 lua_pushnumber(L, c->size_hints.min_aspect_num);
270 lua_setfield(L, -2, "min_aspect_num");
271 @@ -2119,7 +2119,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
272 lua_setfield(L, -2, "max_aspect_den");
273 }
274
275 - if(c->size_hints.flags & XCB_SIZE_HINT_BASE_SIZE)
276 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE)
277 {
278 lua_pushnumber(L, c->size_hints.base_width);
279 lua_setfield(L, -2, "base_width");
280 @@ -2127,7 +2127,7 @@ luaA_client_get_size_hints(lua_State *L, client_t *c)
281 lua_setfield(L, -2, "base_height");
282 }
283
284 - if(c->size_hints.flags & XCB_SIZE_HINT_P_WIN_GRAVITY)
285 + if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY)
286 {
287 switch(c->size_hints.win_gravity)
288 {
289 diff --git a/client.h b/client.h
290 index d4ef52f..9674fac 100644
291 --- a/client.h
292 +++ b/client.h
293 @@ -123,7 +123,7 @@ struct client_t
294 /** Window holding command needed to start it (session management related) */
295 xcb_window_t leader_window;
296 /** Client's WM_PROTOCOLS property */
297 - xcb_get_wm_protocols_reply_t protocols;
298 + xcb_icccm_get_wm_protocols_reply_t protocols;
299 /** Client logical screen */
300 screen_t *screen;
301 /** Client physical screen */
302 @@ -248,8 +248,8 @@ client_raise(client_t *c)
303 static inline bool
304 client_isfixed(client_t *c)
305 {
306 - return (c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE
307 - && c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE
308 + return (c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE
309 + && c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE
310 && c->size_hints.max_width == c->size_hints.min_width
311 && c->size_hints.max_height == c->size_hints.min_height
312 && c->size_hints.max_width
313 diff --git a/common/xutil.c b/common/xutil.c
314 index 3d80e8d..c5a2127 100644
315 --- a/common/xutil.c
316 +++ b/common/xutil.c
317 @@ -25,7 +25,6 @@
318 #include "common/util.h"
319
320 #include <xcb/xcb.h>
321 -#include <xcb/xcb_atom.h>
322 #include <xcb/xcb_icccm.h>
323
324 #include "common/xutil.h"
325 diff --git a/event.c b/event.c
326 index 8527ec5..a35918b 100644
327 --- a/event.c
328 +++ b/event.c
329 @@ -721,7 +721,7 @@ event_handle_clientmessage(xcb_client_message_event_t *ev)
330 client_t *c;
331 if((c = client_getbywin(ev->window))
332 && ev->format == 32
333 - && ev->data.data32[0] == XCB_WM_STATE_ICONIC)
334 + && ev->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC)
335 {
336 luaA_object_push(globalconf.L, c);
337 client_set_minimized(globalconf.L, -1, true);
338 @@ -795,13 +795,13 @@ static void
339 xerror(xcb_generic_error_t *e)
340 {
341 /* ignore this */
342 - if(e->error_code == XCB_EVENT_ERROR_BAD_WINDOW
343 - || (e->error_code == XCB_EVENT_ERROR_BAD_MATCH
344 + if(e->error_code == XCB_WINDOW
345 + || (e->error_code == XCB_MATCH
346 && e->major_code == XCB_SET_INPUT_FOCUS)
347 - || (e->error_code == XCB_EVENT_ERROR_BAD_VALUE
348 + || (e->error_code == XCB_VALUE
349 && e->major_code == XCB_KILL_CLIENT)
350 || (e->major_code == XCB_CONFIGURE_WINDOW
351 - && e->error_code == XCB_EVENT_ERROR_BAD_MATCH))
352 + && e->error_code == XCB_MATCH))
353 return;
354
355 warn("X error: request=%s, error=%s",
356 diff --git a/ewmh.c b/ewmh.c
357 index 0aa5de7..ba4776c 100644
358 --- a/ewmh.c
359 +++ b/ewmh.c
360 @@ -226,7 +226,7 @@ ewmh_update_net_active_window(int phys_screen)
361
362 xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
363 xutil_screen_get(globalconf.connection, phys_screen)->root,
364 - _NET_ACTIVE_WINDOW, WINDOW, 32, 1, &win);
365 + _NET_ACTIVE_WINDOW, XCB_ATOM_WINDOW, 32, 1, &win);
366 }
367
368 static void
369 @@ -425,7 +425,7 @@ ewmh_client_update_hints(client_t *c)
370 state[i++] = _NET_WM_STATE_DEMANDS_ATTENTION;
371
372 xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
373 - c->window, _NET_WM_STATE, ATOM, 32, i, state);
374 + c->window, _NET_WM_STATE, XCB_ATOM_ATOM, 32, i, state);
375 }
376
377 /** Update the client active desktop.
378 diff --git a/property.c b/property.c
379 index d5090c6..d2223ef 100644
380 --- a/property.c
381 +++ b/property.c
382 @@ -105,14 +105,14 @@ property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply)
383
384 if(reply)
385 {
386 - if(!xcb_get_wm_transient_for_from_reply(&trans, reply))
387 + if(!xcb_icccm_get_wm_transient_for_from_reply(&trans, reply))
388 return;
389 }
390 else
391 {
392 - if(!xcb_get_wm_transient_for_reply(globalconf.connection,
393 - xcb_get_wm_transient_for_unchecked(globalconf.connection,
394 - c->window),
395 + if(!xcb_icccm_get_wm_transient_for_reply(globalconf.connection,
396 + xcb_icccm_get_wm_transient_for_unchecked(globalconf.connection,
397 + c->window),
398 &trans, NULL))
399 return;
400 }
401 @@ -160,15 +160,15 @@ property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply)
402 {
403 if(reply)
404 {
405 - if(!xcb_get_wm_size_hints_from_reply(&c->size_hints, reply))
406 + if(!xcb_icccm_get_wm_size_hints_from_reply(&c->size_hints, reply))
407 return;
408 }
409 else
410 {
411 - if(!xcb_get_wm_normal_hints_reply(globalconf.connection,
412 - xcb_get_wm_normal_hints_unchecked(globalconf.connection,
413 - c->window),
414 - &c->size_hints, NULL))
415 + if(!xcb_icccm_get_wm_normal_hints_reply(globalconf.connection,
416 + xcb_icccm_get_wm_normal_hints_unchecked(globalconf.connection,
417 + c->window),
418 + &c->size_hints, NULL))
419 return;
420 }
421 }
422 @@ -180,31 +180,31 @@ property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply)
423 void
424 property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply)
425 {
426 - xcb_wm_hints_t wmh;
427 + xcb_icccm_wm_hints_t wmh;
428
429 if(reply)
430 {
431 - if(!xcb_get_wm_hints_from_reply(&wmh, reply))
432 + if(!xcb_icccm_get_wm_hints_from_reply(&wmh, reply))
433 return;
434 }
435 else
436 {
437 - if(!xcb_get_wm_hints_reply(globalconf.connection,
438 - xcb_get_wm_hints_unchecked(globalconf.connection, c->window),
439 - &wmh, NULL))
440 + if(!xcb_icccm_get_wm_hints_reply(globalconf.connection,
441 + xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window),
442 + &wmh, NULL))
443 return;
444 }
445
446 luaA_object_push(globalconf.L, c);
447 - client_set_urgent(globalconf.L, -1, xcb_wm_hints_get_urgency(&wmh));
448 - if(wmh.flags & XCB_WM_HINT_STATE &&
449 - wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
450 + client_set_urgent(globalconf.L, -1, xcb_icccm_wm_hints_get_urgency(&wmh));
451 + if(wmh.flags & XCB_ICCCM_WM_HINT_STATE &&
452 + wmh.initial_state == XCB_ICCCM_WM_STATE_WITHDRAWN)
453 client_set_border_width(globalconf.L, -1, 0);
454
455 - if(wmh.flags & XCB_WM_HINT_INPUT)
456 + if(wmh.flags & XCB_ICCCM_WM_HINT_INPUT)
457 c->nofocus = !wmh.input;
458
459 - if(wmh.flags & XCB_WM_HINT_WINDOW_GROUP)
460 + if(wmh.flags & XCB_ICCCM_WM_HINT_WINDOW_GROUP)
461 client_set_group_window(globalconf.L, -1, wmh.window_group);
462
463 lua_pop(globalconf.L, 1);
464 @@ -217,18 +217,18 @@ property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply)
465 void
466 property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
467 {
468 - xcb_get_wm_class_reply_t hint;
469 + xcb_icccm_get_wm_class_reply_t hint;
470
471 if(reply)
472 {
473 - if(!xcb_get_wm_class_from_reply(&hint, reply))
474 + if(!xcb_icccm_get_wm_class_from_reply(&hint, reply))
475 return;
476 }
477 else
478 {
479 - if(!xcb_get_wm_class_reply(globalconf.connection,
480 - xcb_get_wm_class_unchecked(globalconf.connection, c->window),
481 - &hint, NULL))
482 + if(!xcb_icccm_get_wm_class_reply(globalconf.connection,
483 + xcb_icccm_get_wm_class_unchecked(globalconf.connection, c->window),
484 + &hint, NULL))
485 return;
486 }
487
488 @@ -238,7 +238,7 @@ property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
489
490 /* only delete reply if we get it ourselves */
491 if(!reply)
492 - xcb_get_wm_class_reply_wipe(&hint);
493 + xcb_icccm_get_wm_class_reply_wipe(&hint);
494 }
495
496 static int
497 @@ -308,30 +308,30 @@ property_update_net_wm_pid(client_t *c,
498 void
499 property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply)
500 {
501 - xcb_get_wm_protocols_reply_t protocols;
502 + xcb_icccm_get_wm_protocols_reply_t protocols;
503 xcb_get_property_reply_t *reply_copy;
504
505 if(reply)
506 {
507 reply_copy = p_dup(reply, 1);
508
509 - if(!xcb_get_wm_protocols_from_reply(reply_copy, &protocols))
510 - {
511 + if(!xcb_icccm_get_wm_protocols_from_reply(reply_copy, &protocols))
512 + {
513 p_delete(&reply_copy);
514 return;
515 - }
516 + }
517 }
518 else
519 {
520 /* If this fails for any reason, we still got the old value */
521 - if(!xcb_get_wm_protocols_reply(globalconf.connection,
522 - xcb_get_wm_protocols_unchecked(globalconf.connection,
523 - c->window, WM_PROTOCOLS),
524 - &protocols, NULL))
525 + if(!xcb_icccm_get_wm_protocols_reply(globalconf.connection,
526 + xcb_icccm_get_wm_protocols_unchecked(globalconf.connection,
527 + c->window, WM_PROTOCOLS),
528 + &protocols, NULL))
529 return;
530 }
531
532 - xcb_get_wm_protocols_reply_wipe(&c->protocols);
533 + xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
534 memcpy(&c->protocols, &protocols, sizeof(protocols));
535 }
536
537 diff --git a/selection.c b/selection.c
538 index 527ec40..44b57c5 100644
539 --- a/selection.c
540 +++ b/selection.c
541 @@ -86,18 +86,18 @@ luaA_selection_get(lua_State *L)
542 if(event_notify->selection == XCB_ATOM_PRIMARY
543 && event_notify->property != XCB_NONE)
544 {
545 - xcb_get_text_property_reply_t prop;
546 + xcb_icccm_get_text_property_reply_t prop;
547 xcb_get_property_cookie_t cookie =
548 - xcb_get_text_property(globalconf.connection,
549 - event_notify->requestor,
550 - event_notify->property);
551 + xcb_icccm_get_text_property(globalconf.connection,
552 + event_notify->requestor,
553 + event_notify->property);
554
555 - if(xcb_get_text_property_reply(globalconf.connection,
556 - cookie, &prop, NULL))
557 + if(xcb_icccm_get_text_property_reply(globalconf.connection,
558 + cookie, &prop, NULL))
559 {
560 lua_pushlstring(L, prop.name, prop.name_len);
561
562 - xcb_get_text_property_reply_wipe(&prop);
563 + xcb_icccm_get_text_property_reply_wipe(&prop);
564
565 xcb_delete_property(globalconf.connection,
566 event_notify->requestor,
567 diff --git a/systray.c b/systray.c
568 index 6ea3dd5..92b7d39 100644
569 --- a/systray.c
570 +++ b/systray.c
571 @@ -197,7 +197,7 @@ systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i
572
573 xcb_change_window_attributes(globalconf.connection, embed_win, XCB_CW_EVENT_MASK,
574 select_input_val);
575 - window_state_set(embed_win, XCB_WM_STATE_WITHDRAWN);
576 + window_state_set(embed_win, XCB_ICCCM_WM_STATE_WITHDRAWN);
577
578 /* we grab the window, but also make sure it's automatically reparented back
579 * to the root window if we should die.
580 diff --git a/window.c b/window.c
581 index b86fa38..6a1909f 100644
582 --- a/window.c
583 +++ b/window.c
584 @@ -60,7 +60,7 @@ uint32_t
585 window_state_get_reply(xcb_get_property_cookie_t cookie)
586 {
587 /* If no property is set, we just assume a sane default. */
588 - uint32_t result = XCB_WM_STATE_NORMAL;
589 + uint32_t result = XCB_ICCCM_WM_STATE_NORMAL;
590 xcb_get_property_reply_t *prop_r;
591
592 if((prop_r = xcb_get_property_reply(globalconf.connection, cookie, NULL)))
593 @@ -187,7 +187,7 @@ window_opacity_set(xcb_window_t win, double opacity)
594 {
595 uint32_t real_opacity = opacity * 0xffffffff;
596 xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win,
597 - _NET_WM_WINDOW_OPACITY, CARDINAL, 32, 1L, &real_opacity);
598 + _NET_WM_WINDOW_OPACITY, XCB_ATOM_CARDINAL, 32, 1L, &real_opacity);
599 }
600 else
601 xcb_delete_property(globalconf.connection, win, _NET_WM_WINDOW_OPACITY);
602 --
603 1.7.4.4