Ticket #29558: patch-upstream-xcb.diff

File patch-upstream-xcb.diff, 22.5 KB (added by jwatzman@…, 13 years ago)

upstream diff to fix with xcb-util 0.3.8

  • awesome.c

    From c9f6b65c19e3e8ebd1bd4ca860a0e1fd66931e65 Mon Sep 17 00:00:00 2001
    From: Arnaud Fontaine <arnau@debian.org>
    Date: Wed, 27 Apr 2011 15:44:35 +0900
    Subject: [PATCH 1/1] Update the code following release of xcb-util 0.3.8.
    
    xcb-util is now split into several repositories since 0.3.8. This
    release also cleaned up the API a lot, thus update the code
    accordingly.
    
    Signed-off-by: Arnaud Fontaine <arnau@debian.org>
    Signed-off-by: Uli Schlachter <psychon@znc.in>
    ---
     awesome.c           |    2 +-
     awesomeConfig.cmake |    7 ++---
     client.c            |   56 +++++++++++++++++++++---------------------
     client.h            |    6 ++--
     common/xutil.c      |    1 -
     event.c             |   10 +++---
     ewmh.c              |    4 +-
     property.c          |   68 +++++++++++++++++++++++++-------------------------
     selection.c         |   14 +++++-----
     systray.c           |    2 +-
     window.c            |    4 +-
     11 files changed, 86 insertions(+), 88 deletions(-)
    
    diff --git a/awesome.c b/awesome.c
    index f89080c..1258b4c 100644
    a b scan(void) 
    154154
    155155            if(!attr_r || attr_r->override_redirect
    156156               || attr_r->map_state == XCB_MAP_STATE_UNMAPPED
    157                || state == XCB_WM_STATE_WITHDRAWN)
     157               || state == XCB_ICCCM_WM_STATE_WITHDRAWN)
    158158            {
    159159                geom_wins[i] = NULL;
    160160                p_delete(&attr_r);
  • awesomeConfig.cmake

    diff --git a/awesomeConfig.cmake b/awesomeConfig.cmake
    index ee75d49..252110a 100644
    a b execute_process( 
    127127
    128128# Use pkgconfig to get most of the libraries
    129129pkg_check_modules(AWESOME_COMMON_REQUIRED REQUIRED
    130     xcb>=1.4)
     130    xcb>=1.6)
    131131
    132132pkg_check_modules(AWESOME_REQUIRED REQUIRED
    133133    glib-2.0
    pkg_check_modules(AWESOME_REQUIRED REQUIRED 
    139139    xcb-xtest
    140140    xcb-xinerama
    141141    xcb-shape
    142     xcb-aux>=0.3.0
    143     xcb-atom>=0.3.0
     142    xcb-util>=0.3.8
    144143    xcb-keysyms>=0.3.4
    145     xcb-icccm>=0.3.6
     144    xcb-icccm>=0.3.8
    146145    xcb-image>=0.3.0
    147146    cairo-xcb
    148147    libstartup-notification-1.0>=0.10
  • client.c

    diff --git a/client.c b/client.c
    index 049e3d5..baae69f 100644
    a b luaA_client_gc(lua_State *L) 
    5252    client_t *c = luaA_checkudata(L, 1, &client_class);
    5353    button_array_wipe(&c->buttons);
    5454    key_array_wipe(&c->keys);
    55     xcb_get_wm_protocols_reply_wipe(&c->protocols);
     55    xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
    5656    p_delete(&c->machine);
    5757    p_delete(&c->class);
    5858    p_delete(&c->instance);
    client_set_urgent(lua_State *L, int cidx, bool urgent) 
    9494    if(c->urgent != urgent)
    9595    {
    9696        xcb_get_property_cookie_t hints =
    97             xcb_get_wm_hints_unchecked(globalconf.connection, c->window);
     97            xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window);
    9898
    9999        c->urgent = urgent;
    100100        ewmh_client_update_hints(c);
    101101
    102102        /* update ICCCM hints */
    103         xcb_wm_hints_t wmh;
    104         xcb_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
     103        xcb_icccm_wm_hints_t wmh;
     104        xcb_icccm_get_wm_hints_reply(globalconf.connection, hints, &wmh, NULL);
    105105
    106106        if(urgent)
    107             wmh.flags |= XCB_WM_HINT_X_URGENCY;
     107            wmh.flags |= XCB_ICCCM_WM_HINT_X_URGENCY;
    108108        else
    109             wmh.flags &= ~XCB_WM_HINT_X_URGENCY;
     109            wmh.flags &= ~XCB_ICCCM_WM_HINT_X_URGENCY;
    110110
    111         xcb_set_wm_hints(globalconf.connection, c->window, &wmh);
     111        xcb_icccm_set_wm_hints(globalconf.connection, c->window, &wmh);
    112112
    113113        hook_property(c, "urgent");
    114114        luaA_object_emit_signal(L, cidx, "property::urgent", 0);
    HANDLE_GEOM(height) 
    721721     *
    722722     * At this stage it's just safer to keep it in normal state and avoid confusion.
    723723     */
    724     window_state_set(c->window, XCB_WM_STATE_NORMAL);
     724    window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
    725725
    726726    if(!startup)
    727727    {
    client_geometry_hints(client_t *c, area_t geometry) 
    767767    int32_t real_basew = 0, real_baseh = 0;
    768768
    769769    /* base size is substituted with min size if not specified */
    770     if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
     770    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
    771771    {
    772772        basew = c->size_hints.base_width;
    773773        baseh = c->size_hints.base_height;
    774774        real_basew = basew;
    775775        real_baseh = baseh;
    776776    }
    777     else if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
     777    else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
    778778    {
    779779        basew = c->size_hints.min_width;
    780780        baseh = c->size_hints.min_height;
    client_geometry_hints(client_t *c, area_t geometry) 
    783783        basew = baseh = 0;
    784784
    785785    /* min size is substituted with base size if not specified */
    786     if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
     786    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
    787787    {
    788788        minw = c->size_hints.min_width;
    789789        minh = c->size_hints.min_height;
    790790    }
    791     else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
     791    else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
    792792    {
    793793        minw = c->size_hints.base_width;
    794794        minh = c->size_hints.base_height;
    client_geometry_hints(client_t *c, area_t geometry) 
    796796    else
    797797        minw = minh = 0;
    798798
    799     if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT
     799    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT
    800800       && c->size_hints.min_aspect_den > 0
    801801       && c->size_hints.max_aspect_den > 0
    802802       && geometry.height - real_baseh > 0
    client_geometry_hints(client_t *c, area_t geometry) 
    838838    if(minh)
    839839        geometry.height = MAX(geometry.height, minh);
    840840
    841     if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
     841    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
    842842    {
    843843        if(c->size_hints.max_width)
    844844            geometry.width = MIN(geometry.width, c->size_hints.max_width);
    client_geometry_hints(client_t *c, area_t geometry) 
    846846            geometry.height = MIN(geometry.height, c->size_hints.max_height);
    847847    }
    848848
    849     if(c->size_hints.flags & (XCB_SIZE_HINT_P_RESIZE_INC | XCB_SIZE_HINT_BASE_SIZE)
     849    if(c->size_hints.flags & (XCB_ICCCM_SIZE_HINT_P_RESIZE_INC | XCB_ICCCM_SIZE_HINT_BASE_SIZE)
    850850       && c->size_hints.width_inc && c->size_hints.height_inc)
    851851    {
    852852        uint16_t t1 = geometry.width, t2 = geometry.height;
    client_set_minimized(lua_State *L, int cidx, bool s) 
    969969        c->minimized = s;
    970970        banning_need_update((c)->screen);
    971971        if(s)
    972             window_state_set(c->window, XCB_WM_STATE_ICONIC);
     972            window_state_set(c->window, XCB_ICCCM_WM_STATE_ICONIC);
    973973        else
    974             window_state_set(c->window, XCB_WM_STATE_NORMAL);
     974            window_state_set(c->window, XCB_ICCCM_WM_STATE_NORMAL);
    975975        ewmh_client_update_hints(c);
    976976        if(strut_has_value(&c->strut))
    977977            screen_emit_signal(globalconf.L, c->screen, "property::workarea", 0);
    client_unmanage(client_t *c) 
    13331333
    13341334    /* Do this last to avoid races with clients. According to ICCCM, clients
    13351335     * arent allowed to re-use the window until after this. */
    1336     window_state_set(c->window, XCB_WM_STATE_WITHDRAWN);
     1336    window_state_set(c->window, XCB_ICCCM_WM_STATE_WITHDRAWN);
    13371337
    13381338    /* set client as invalid */
    13391339    c->invalid = true;
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    20522052
    20532053    lua_createtable(L, 0, 1);
    20542054
    2055     if(c->size_hints.flags & XCB_SIZE_HINT_US_POSITION)
     2055    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_POSITION)
    20562056        u_or_p = "user_position";
    2057     else if(c->size_hints.flags & XCB_SIZE_HINT_P_POSITION)
     2057    else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_POSITION)
    20582058        u_or_p = "program_position";
    20592059
    20602060    if(u_or_p)
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    20682068        u_or_p = NULL;
    20692069    }
    20702070
    2071     if(c->size_hints.flags & XCB_SIZE_HINT_US_SIZE)
     2071    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_US_SIZE)
    20722072        u_or_p = "user_size";
    2073     else if(c->size_hints.flags & XCB_SIZE_HINT_P_SIZE)
     2073    else if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_SIZE)
    20742074        u_or_p = "program_size";
    20752075
    20762076    if(u_or_p)
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    20832083        lua_setfield(L, -2, u_or_p);
    20842084    }
    20852085
    2086     if(c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE)
     2086    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE)
    20872087    {
    20882088        lua_pushnumber(L, c->size_hints.min_width);
    20892089        lua_setfield(L, -2, "min_width");
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    20912091        lua_setfield(L, -2, "min_height");
    20922092    }
    20932093
    2094     if(c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE)
     2094    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE)
    20952095    {
    20962096        lua_pushnumber(L, c->size_hints.max_width);
    20972097        lua_setfield(L, -2, "max_width");
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    20992099        lua_setfield(L, -2, "max_height");
    21002100    }
    21012101
    2102     if(c->size_hints.flags & XCB_SIZE_HINT_P_RESIZE_INC)
     2102    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_RESIZE_INC)
    21032103    {
    21042104        lua_pushnumber(L, c->size_hints.width_inc);
    21052105        lua_setfield(L, -2, "width_inc");
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    21072107        lua_setfield(L, -2, "height_inc");
    21082108    }
    21092109
    2110     if(c->size_hints.flags & XCB_SIZE_HINT_P_ASPECT)
     2110    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_ASPECT)
    21112111    {
    21122112        lua_pushnumber(L, c->size_hints.min_aspect_num);
    21132113        lua_setfield(L, -2, "min_aspect_num");
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    21192119        lua_setfield(L, -2, "max_aspect_den");
    21202120    }
    21212121
    2122     if(c->size_hints.flags & XCB_SIZE_HINT_BASE_SIZE)
     2122    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_BASE_SIZE)
    21232123    {
    21242124        lua_pushnumber(L, c->size_hints.base_width);
    21252125        lua_setfield(L, -2, "base_width");
    luaA_client_get_size_hints(lua_State *L, client_t *c) 
    21272127        lua_setfield(L, -2, "base_height");
    21282128    }
    21292129
    2130     if(c->size_hints.flags & XCB_SIZE_HINT_P_WIN_GRAVITY)
     2130    if(c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_WIN_GRAVITY)
    21312131    {
    21322132        switch(c->size_hints.win_gravity)
    21332133        {
  • client.h

    diff --git a/client.h b/client.h
    index d4ef52f..9674fac 100644
    a b struct client_t 
    123123    /** Window holding command needed to start it (session management related) */
    124124    xcb_window_t leader_window;
    125125    /** Client's WM_PROTOCOLS property */
    126     xcb_get_wm_protocols_reply_t protocols;
     126    xcb_icccm_get_wm_protocols_reply_t protocols;
    127127    /** Client logical screen */
    128128    screen_t *screen;
    129129    /** Client physical screen */
    client_raise(client_t *c) 
    248248static inline bool
    249249client_isfixed(client_t *c)
    250250{
    251     return (c->size_hints.flags & XCB_SIZE_HINT_P_MAX_SIZE
    252             && c->size_hints.flags & XCB_SIZE_HINT_P_MIN_SIZE
     251    return (c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MAX_SIZE
     252            && c->size_hints.flags & XCB_ICCCM_SIZE_HINT_P_MIN_SIZE
    253253            && c->size_hints.max_width == c->size_hints.min_width
    254254            && c->size_hints.max_height == c->size_hints.min_height
    255255            && c->size_hints.max_width
  • common/xutil.c

    diff --git a/common/xutil.c b/common/xutil.c
    index 3d80e8d..c5a2127 100644
    a b  
    2525#include "common/util.h"
    2626
    2727#include <xcb/xcb.h>
    28 #include <xcb/xcb_atom.h>
    2928#include <xcb/xcb_icccm.h>
    3029
    3130#include "common/xutil.h"
  • event.c

    diff --git a/event.c b/event.c
    index 8527ec5..a35918b 100644
    a b event_handle_clientmessage(xcb_client_message_event_t *ev) 
    721721        client_t *c;
    722722        if((c = client_getbywin(ev->window))
    723723           && ev->format == 32
    724            && ev->data.data32[0] == XCB_WM_STATE_ICONIC)
     724           && ev->data.data32[0] == XCB_ICCCM_WM_STATE_ICONIC)
    725725        {
    726726            luaA_object_push(globalconf.L, c);
    727727            client_set_minimized(globalconf.L, -1, true);
    static void 
    795795xerror(xcb_generic_error_t *e)
    796796{
    797797    /* ignore this */
    798     if(e->error_code == XCB_EVENT_ERROR_BAD_WINDOW
    799        || (e->error_code == XCB_EVENT_ERROR_BAD_MATCH
     798    if(e->error_code == XCB_WINDOW
     799       || (e->error_code == XCB_MATCH
    800800           && e->major_code == XCB_SET_INPUT_FOCUS)
    801        || (e->error_code == XCB_EVENT_ERROR_BAD_VALUE
     801       || (e->error_code == XCB_VALUE
    802802           && e->major_code == XCB_KILL_CLIENT)
    803803       || (e->major_code == XCB_CONFIGURE_WINDOW
    804            && e->error_code == XCB_EVENT_ERROR_BAD_MATCH))
     804           && e->error_code == XCB_MATCH))
    805805        return;
    806806
    807807    warn("X error: request=%s, error=%s",
  • ewmh.c

    diff --git a/ewmh.c b/ewmh.c
    index 0aa5de7..ba4776c 100644
    a b ewmh_update_net_active_window(int phys_screen) 
    226226
    227227    xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
    228228                        xutil_screen_get(globalconf.connection, phys_screen)->root,
    229                         _NET_ACTIVE_WINDOW, WINDOW, 32, 1, &win);
     229                        _NET_ACTIVE_WINDOW, XCB_ATOM_WINDOW, 32, 1, &win);
    230230}
    231231
    232232static void
    ewmh_client_update_hints(client_t *c) 
    425425        state[i++] = _NET_WM_STATE_DEMANDS_ATTENTION;
    426426
    427427    xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE,
    428                         c->window, _NET_WM_STATE, ATOM, 32, i, state);
     428                        c->window, _NET_WM_STATE, XCB_ATOM_ATOM, 32, i, state);
    429429}
    430430
    431431/** Update the client active desktop.
  • property.c

    diff --git a/property.c b/property.c
    index d5090c6..d2223ef 100644
    a b property_update_wm_transient_for(client_t *c, xcb_get_property_reply_t *reply) 
    105105
    106106    if(reply)
    107107    {
    108         if(!xcb_get_wm_transient_for_from_reply(&trans, reply))
     108        if(!xcb_icccm_get_wm_transient_for_from_reply(&trans, reply))
    109109            return;
    110110    }
    111111    else
    112112    {
    113         if(!xcb_get_wm_transient_for_reply(globalconf.connection,
    114                                             xcb_get_wm_transient_for_unchecked(globalconf.connection,
    115                                                                                c->window),
     113        if(!xcb_icccm_get_wm_transient_for_reply(globalconf.connection,
     114                                            xcb_icccm_get_wm_transient_for_unchecked(globalconf.connection,
     115                                                                                     c->window),
    116116                                            &trans, NULL))
    117117            return;
    118118    }
    property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply) 
    160160{
    161161    if(reply)
    162162    {
    163         if(!xcb_get_wm_size_hints_from_reply(&c->size_hints, reply))
     163        if(!xcb_icccm_get_wm_size_hints_from_reply(&c->size_hints, reply))
    164164            return;
    165165    }
    166166    else
    167167    {
    168         if(!xcb_get_wm_normal_hints_reply(globalconf.connection,
    169                                           xcb_get_wm_normal_hints_unchecked(globalconf.connection,
    170                                                                             c->window),
    171                                           &c->size_hints, NULL))
     168        if(!xcb_icccm_get_wm_normal_hints_reply(globalconf.connection,
     169                                                xcb_icccm_get_wm_normal_hints_unchecked(globalconf.connection,
     170                                                                                        c->window),
     171                                                &c->size_hints, NULL))
    172172            return;
    173173    }
    174174}
    property_update_wm_normal_hints(client_t *c, xcb_get_property_reply_t *reply) 
    180180void
    181181property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply)
    182182{
    183     xcb_wm_hints_t wmh;
     183    xcb_icccm_wm_hints_t wmh;
    184184
    185185    if(reply)
    186186    {
    187         if(!xcb_get_wm_hints_from_reply(&wmh, reply))
     187        if(!xcb_icccm_get_wm_hints_from_reply(&wmh, reply))
    188188            return;
    189189    }
    190190    else
    191191    {
    192         if(!xcb_get_wm_hints_reply(globalconf.connection,
    193                                   xcb_get_wm_hints_unchecked(globalconf.connection, c->window),
    194                                   &wmh, NULL))
     192        if(!xcb_icccm_get_wm_hints_reply(globalconf.connection,
     193                                         xcb_icccm_get_wm_hints_unchecked(globalconf.connection, c->window),
     194                                         &wmh, NULL))
    195195            return;
    196196    }
    197197
    198198    luaA_object_push(globalconf.L, c);
    199     client_set_urgent(globalconf.L, -1, xcb_wm_hints_get_urgency(&wmh));
    200     if(wmh.flags & XCB_WM_HINT_STATE &&
    201        wmh.initial_state == XCB_WM_STATE_WITHDRAWN)
     199    client_set_urgent(globalconf.L, -1, xcb_icccm_wm_hints_get_urgency(&wmh));
     200    if(wmh.flags & XCB_ICCCM_WM_HINT_STATE &&
     201       wmh.initial_state == XCB_ICCCM_WM_STATE_WITHDRAWN)
    202202        client_set_border_width(globalconf.L, -1, 0);
    203203
    204     if(wmh.flags & XCB_WM_HINT_INPUT)
     204    if(wmh.flags & XCB_ICCCM_WM_HINT_INPUT)
    205205        c->nofocus = !wmh.input;
    206206
    207     if(wmh.flags & XCB_WM_HINT_WINDOW_GROUP)
     207    if(wmh.flags & XCB_ICCCM_WM_HINT_WINDOW_GROUP)
    208208        client_set_group_window(globalconf.L, -1, wmh.window_group);
    209209
    210210    lua_pop(globalconf.L, 1);
    property_update_wm_hints(client_t *c, xcb_get_property_reply_t *reply) 
    217217void
    218218property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply)
    219219{
    220     xcb_get_wm_class_reply_t hint;
     220    xcb_icccm_get_wm_class_reply_t hint;
    221221
    222222    if(reply)
    223223    {
    224         if(!xcb_get_wm_class_from_reply(&hint, reply))
     224        if(!xcb_icccm_get_wm_class_from_reply(&hint, reply))
    225225            return;
    226226    }
    227227    else
    228228    {
    229         if(!xcb_get_wm_class_reply(globalconf.connection,
    230                                    xcb_get_wm_class_unchecked(globalconf.connection, c->window),
    231                                    &hint, NULL))
     229        if(!xcb_icccm_get_wm_class_reply(globalconf.connection,
     230                                         xcb_icccm_get_wm_class_unchecked(globalconf.connection, c->window),
     231                                         &hint, NULL))
    232232            return;
    233233    }
    234234
    property_update_wm_class(client_t *c, xcb_get_property_reply_t *reply) 
    238238
    239239    /* only delete reply if we get it ourselves */
    240240    if(!reply)
    241         xcb_get_wm_class_reply_wipe(&hint);
     241        xcb_icccm_get_wm_class_reply_wipe(&hint);
    242242}
    243243
    244244static int
    property_update_net_wm_pid(client_t *c, 
    308308void
    309309property_update_wm_protocols(client_t *c, xcb_get_property_reply_t *reply)
    310310{
    311     xcb_get_wm_protocols_reply_t protocols;
     311    xcb_icccm_get_wm_protocols_reply_t protocols;
    312312    xcb_get_property_reply_t *reply_copy;
    313313
    314314    if(reply)
    315315    {
    316316        reply_copy = p_dup(reply, 1);
    317317
    318         if(!xcb_get_wm_protocols_from_reply(reply_copy, &protocols))
    319         {
     318        if(!xcb_icccm_get_wm_protocols_from_reply(reply_copy, &protocols))
     319        {
    320320            p_delete(&reply_copy);
    321321            return;
    322         }
     322        }
    323323    }
    324324    else
    325325    {
    326326        /* If this fails for any reason, we still got the old value */
    327         if(!xcb_get_wm_protocols_reply(globalconf.connection,
    328                                       xcb_get_wm_protocols_unchecked(globalconf.connection,
    329                                                                      c->window, WM_PROTOCOLS),
    330                                       &protocols, NULL))
     327        if(!xcb_icccm_get_wm_protocols_reply(globalconf.connection,
     328                                             xcb_icccm_get_wm_protocols_unchecked(globalconf.connection,
     329                                                                                  c->window, WM_PROTOCOLS),
     330                                             &protocols, NULL))
    331331            return;
    332332    }
    333333
    334     xcb_get_wm_protocols_reply_wipe(&c->protocols);
     334    xcb_icccm_get_wm_protocols_reply_wipe(&c->protocols);
    335335    memcpy(&c->protocols, &protocols, sizeof(protocols));
    336336}
    337337
  • selection.c

    diff --git a/selection.c b/selection.c
    index 527ec40..44b57c5 100644
    a b luaA_selection_get(lua_State *L) 
    8686        if(event_notify->selection == XCB_ATOM_PRIMARY
    8787           && event_notify->property != XCB_NONE)
    8888        {
    89             xcb_get_text_property_reply_t prop;
     89            xcb_icccm_get_text_property_reply_t prop;
    9090            xcb_get_property_cookie_t cookie =
    91                 xcb_get_text_property(globalconf.connection,
    92                                       event_notify->requestor,
    93                                       event_notify->property);
     91                xcb_icccm_get_text_property(globalconf.connection,
     92                                            event_notify->requestor,
     93                                            event_notify->property);
    9494
    95             if(xcb_get_text_property_reply(globalconf.connection,
    96                                            cookie, &prop, NULL))
     95            if(xcb_icccm_get_text_property_reply(globalconf.connection,
     96                                                 cookie, &prop, NULL))
    9797            {
    9898                lua_pushlstring(L, prop.name, prop.name_len);
    9999
    100                 xcb_get_text_property_reply_wipe(&prop);
     100                xcb_icccm_get_text_property_reply_wipe(&prop);
    101101
    102102                xcb_delete_property(globalconf.connection,
    103103                                    event_notify->requestor,
  • systray.c

    diff --git a/systray.c b/systray.c
    index 6ea3dd5..92b7d39 100644
    a b systray_request_handle(xcb_window_t embed_win, int phys_screen, xembed_info_t *i 
    197197
    198198    xcb_change_window_attributes(globalconf.connection, embed_win, XCB_CW_EVENT_MASK,
    199199                                 select_input_val);
    200     window_state_set(embed_win, XCB_WM_STATE_WITHDRAWN);
     200    window_state_set(embed_win, XCB_ICCCM_WM_STATE_WITHDRAWN);
    201201
    202202    /* we grab the window, but also make sure it's automatically reparented back
    203203     * to the root window if we should die.
  • window.c

    diff --git a/window.c b/window.c
    index b86fa38..6a1909f 100644
    a b uint32_t 
    6060window_state_get_reply(xcb_get_property_cookie_t cookie)
    6161{
    6262    /* If no property is set, we just assume a sane default. */
    63     uint32_t result = XCB_WM_STATE_NORMAL;
     63    uint32_t result = XCB_ICCCM_WM_STATE_NORMAL;
    6464    xcb_get_property_reply_t *prop_r;
    6565
    6666    if((prop_r = xcb_get_property_reply(globalconf.connection, cookie, NULL)))
    window_opacity_set(xcb_window_t win, double opacity) 
    187187    {
    188188        uint32_t real_opacity = opacity * 0xffffffff;
    189189        xcb_change_property(globalconf.connection, XCB_PROP_MODE_REPLACE, win,
    190                             _NET_WM_WINDOW_OPACITY, CARDINAL, 32, 1L, &real_opacity);
     190                            _NET_WM_WINDOW_OPACITY, XCB_ATOM_CARDINAL, 32, 1L, &real_opacity);
    191191    }
    192192    else
    193193        xcb_delete_property(globalconf.connection, win, _NET_WM_WINDOW_OPACITY);