1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-25 13:55:34 -05:00

Pull StartupNotificaiton Display event handling into the main event loop

This commit is contained in:
Dave Davenport 2016-02-11 08:22:48 +01:00
parent d982c3cdbd
commit 3b007b7eff
2 changed files with 3 additions and 8 deletions

View file

@ -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 ) ) {

View file

@ -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 ) ) {