diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-02-28 11:57:52 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-02-28 11:57:52 +0100 |
commit | c519b6a65a7470bc48cf17dd9d52ad772feb3def (patch) | |
tree | 4bd235060f49032a71383baaff697c4f3010aa1d | |
parent | 91ad94aef3005d143fa7c554aa3cdece9aa5f9e3 (diff) |
Fix free'ing of ewmh calls, remove old X codes
-rw-r--r-- | source/rofi.c | 8 | ||||
-rw-r--r-- | source/x11-helper.c | 7 |
2 files changed, 4 insertions, 11 deletions
diff --git a/source/rofi.c b/source/rofi.c index b1196ee8..a26d2813 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -629,14 +629,6 @@ int main ( int argc, char *argv[] ) return EXIT_FAILURE; } - if ( !XSupportsLocale () ) { - fprintf ( stderr, "X11 does not support locales\n" ); - return EXIT_FAILURE; - } - if ( XSetLocaleModifiers ( "@im=none" ) == NULL ) { - fprintf ( stderr, "Failed to set locale modifier.\n" ); - return EXIT_FAILURE; - } xcb_connection = xcb_connect ( display_str, &xcb_screen_nbr ); TICK_N ( "Open Display" ); diff --git a/source/x11-helper.c b/source/x11-helper.c index 312b54ed..200fedf8 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -257,15 +257,16 @@ void monitor_active ( xcb_connection_t *xcb_connection, workarea *mon ) unsigned int current_desktop = 0; if ( config.monitor != -2 && xcb_ewmh_get_current_desktop_reply ( &xcb_ewmh, xcb_ewmh_get_current_desktop( &xcb_ewmh, xcb_screen_nbr), ¤t_desktop, NULL )) { + xcb_get_property_cookie_t c = xcb_ewmh_get_desktop_viewport(&xcb_ewmh, xcb_screen_nbr); xcb_ewmh_get_desktop_viewport_reply_t vp; - if ( xcb_ewmh_get_desktop_viewport_reply ( &xcb_ewmh, - xcb_ewmh_get_desktop_viewport(&xcb_ewmh, xcb_screen_nbr), - &vp, NULL)){ + if ( xcb_ewmh_get_desktop_viewport_reply ( &xcb_ewmh, c, &vp, NULL)){ if ( current_desktop < vp.desktop_viewport_len) { monitor_dimensions ( xcb_connection, xcb_screen, vp.desktop_viewport[current_desktop].x, vp.desktop_viewport[current_desktop].y, mon ); + xcb_ewmh_get_desktop_viewport_reply_wipe(&vp); return; } + xcb_ewmh_get_desktop_viewport_reply_wipe(&vp); } } |