1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Test #454 unmap window before switching.

This commit is contained in:
Dave Davenport 2016-08-30 08:14:53 +02:00
parent e79361e890
commit 51eac318fd
3 changed files with 12 additions and 0 deletions

View file

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

View file

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

View file

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