summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-02-28 00:15:42 +0100
committerDave Davenport <qball@gmpclient.org>2016-02-28 00:15:42 +0100
commitc261aa8e8929dff92e74efc9482b5ac3538147f3 (patch)
treed8faa9afcdd450aee1a8b236ab4feffa7b1a4c59 /source
parentd813d03a5fa16d187e446dd565cc4a6073d5ba68 (diff)
change startup notification to xcb
Diffstat (limited to 'source')
-rw-r--r--source/rofi.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/rofi.c b/source/rofi.c
index eca01995..75f49d79 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -496,19 +496,19 @@ static gboolean main_loop_signal_handler_int ( G_GNUC_UNUSED gpointer data )
}
static int error_trap_depth = 0;
-static void error_trap_push ( G_GNUC_UNUSED SnDisplay *display, G_GNUC_UNUSED Display *xdisplay )
+static void error_trap_push ( G_GNUC_UNUSED SnDisplay *display, G_GNUC_UNUSED xcb_connection_t *xdisplay )
{
++error_trap_depth;
}
-static void error_trap_pop ( G_GNUC_UNUSED SnDisplay *display, Display *xdisplay )
+static void error_trap_pop ( G_GNUC_UNUSED SnDisplay *display, xcb_connection_t *xdisplay )
{
if ( error_trap_depth == 0 ) {
fprintf ( stderr, "Error trap underflow!\n" );
exit ( EXIT_FAILURE );
}
- XSync ( xdisplay, False ); /* get all errors out of the queue */
+ xcb_flush(xdisplay);
--error_trap_depth;
}
@@ -734,10 +734,10 @@ int main ( int argc, char *argv[] )
TICK_N ( "Setup mainloop" );
// startup not.
- sndisplay = sn_display_new ( display, error_trap_push, error_trap_pop );
+ sndisplay = sn_xcb_display_new ( xcb_connection, error_trap_push, error_trap_pop );
if ( sndisplay != NULL ) {
- sncontext = sn_launchee_context_new_from_environment ( sndisplay, DefaultScreen ( display ) );
+ sncontext = sn_launchee_context_new_from_environment ( sndisplay, xcb_screen_nbr);
}
TICK_N ( "Startup Notification" );