summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2016-02-11 08:22:48 +0100
committerDave Davenport <qball@gmpclient.org>2016-02-11 08:22:48 +0100
commit3b007b7effa9928cff6a4dae6bffcbcaa50643ec (patch)
tree38aca79f32830d9b791b98d2b149bee563830b39 /source
parentd982c3cdbd04adcfab72dbc619f4f7b2b339b308 (diff)
Pull StartupNotificaiton Display event handling into the main event loop
Diffstat (limited to 'source')
-rw-r--r--source/rofi.c3
-rw-r--r--source/view.c8
2 files changed, 3 insertions, 8 deletions
diff --git a/source/rofi.c b/source/rofi.c
index f6f20478..90dc6041 100644
--- a/source/rofi.c
+++ b/source/rofi.c
@@ -534,6 +534,9 @@ gboolean main_loop_x11_event_handler ( G_GNUC_UNUSED gpointer data )
XEvent ev;
// Read event, we know this won't block as we checked with XPending.
XNextEvent ( display, &ev );
+ if ( sndisplay != NULL ) {
+ sn_display_process_event ( sndisplay, &ev );
+ }
rofi_view_itterrate ( state, &ev );
}
if ( rofi_view_get_completed ( state ) ) {
diff --git a/source/view.c b/source/view.c
index b01d7ab2..0d86a5eb 100644
--- a/source/view.c
+++ b/source/view.c
@@ -72,7 +72,6 @@ extern Mode **modi;
// What todo with these.
extern Display *display;
-extern SnDisplay *sndisplay;
extern SnLauncheeContext *sncontext;
GThreadPool *tpool = NULL;
@@ -1192,9 +1191,6 @@ void rofi_view_setup_fake_transparency ( Display *display, RofiViewState *state
static void rofi_view_mainloop_iter ( RofiViewState *state, XEvent *ev )
{
- if ( sndisplay != NULL ) {
- sn_display_process_event ( sndisplay, ev );
- }
if ( ev->type == KeymapNotify ) {
XRefreshKeyboardMapping ( &( ev->xmapping ) );
}
@@ -1597,10 +1593,6 @@ RofiViewState *rofi_view_create ( Mode *sw,
}
static void __error_dialog_event_loop ( RofiViewState *state, XEvent *ev )
{
- // Wait for event.
- if ( sndisplay != NULL ) {
- sn_display_process_event ( sndisplay, ev );
- }
// Handle event.
if ( ev->type == Expose ) {
while ( XCheckTypedEvent ( display, Expose, ev ) ) {