1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-04-14 17:43:01 -04:00

xcb: Steal focus in O-R mode

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2020-03-26 13:45:45 +01:00
parent 627bd43510
commit 1c9d975dd2
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7

View file

@ -1894,6 +1894,13 @@ RofiViewState *rofi_view_create ( Mode *sw,
xcb_map_window ( xcb->connection, CacheState.main_window );
widget_queue_redraw ( WIDGET ( state->main_window ) );
xcb_flush ( xcb->connection );
/* When Override Redirect, the WM will not let us know we can take focus, so just steal it */
if ( ( ( menu_flags & MENU_NORMAL_WINDOW ) == 0 ) ) {
xcb_set_input_focus ( xcb->connection, XCB_INPUT_FOCUS_NONE, CacheState.main_window, XCB_CURRENT_TIME );
xcb_flush ( xcb->connection );
}
if ( xcb->sncontext != NULL ) {
sn_launchee_context_complete ( xcb->sncontext );
}