From 51eac318fd5f6803f86831a3a6ddf3f34cb34abe Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 30 Aug 2016 08:14:53 +0200 Subject: [PATCH] Test #454 unmap window before switching. --- include/view.h | 4 ++++ source/dialogs/window.c | 1 + source/view.c | 7 +++++++ 3 files changed, 12 insertions(+) diff --git a/include/view.h b/include/view.h index 5ce93d09..827f57a3 100644 --- a/include/view.h +++ b/include/view.h @@ -157,5 +157,9 @@ void rofi_view_workers_finalize ( void ); void __create_window ( MenuFlags menu_flags ); void rofi_view_set_overlay ( RofiViewState *state, const char *text ); +/** + * Unmap the window. + */ +void rofi_view_hide ( void ); /**@}*/ #endif diff --git a/source/dialogs/window.c b/source/dialogs/window.c index 825875ae..cfcaa1b3 100644 --- a/source/dialogs/window.c +++ b/source/dialogs/window.c @@ -559,6 +559,7 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i act_on_window ( rmpd->ids->array[selected_line] ); } else { + rofi_view_hide (); // Get the current desktop. unsigned int current_desktop = 0; xcb_get_property_cookie_t c = xcb_ewmh_get_current_desktop ( &xcb->ewmh, xcb->screen_nbr ); diff --git a/source/view.c b/source/view.c index 1fedc4f3..d7197832 100644 --- a/source/view.c +++ b/source/view.c @@ -1863,6 +1863,13 @@ int rofi_view_error_dialog ( const char *msg, int markup ) return TRUE; } +void rofi_view_hide ( void ) +{ + if ( CacheState.main_window != XCB_WINDOW_NONE ) { + xcb_unmap_window ( xcb->connection, CacheState.main_window ); + } +} + void rofi_view_cleanup () { if ( CacheState.fake_bg ) {