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