1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-04-07 17:33:14 -04:00

Fix free'ing of ewmh calls, remove old X codes

This commit is contained in:
Dave Davenport 2016-02-28 11:57:52 +01:00
parent 91ad94aef3
commit c519b6a65a
2 changed files with 4 additions and 11 deletions

View file

@ -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" );

View file

@ -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), &current_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);
}
}