Issue #454 pass our window id along in the change active window request

This commit is contained in:
Dave Davenport 2016-11-07 09:15:04 +01:00
parent 90c314f397
commit 545be58e40
3 changed files with 12 additions and 1 deletions

View File

@ -207,6 +207,12 @@ void rofi_view_workers_initialize ( void );
* Stop all threads and free the resources used by the threadpool
*/
void rofi_view_workers_finalize ( void );
/**
* Get the handle of the main window.
*
* @returns the xcb_window_t for rofi's view or XCB_WINDOW_NONE.
*/
xcb_window_t rofi_view_get_window ( void );
/**@}*/
#endif

View File

@ -600,7 +600,7 @@ static ModeMode window_mode_result ( Mode *sw, int mretv, G_GNUC_UNUSED char **i
// Activate the window
xcb_ewmh_request_change_active_window ( &xcb->ewmh, xcb->screen_nbr, rmpd->ids->array[selected_line],
XCB_EWMH_CLIENT_SOURCE_TYPE_OTHER,
XCB_CURRENT_TIME, XCB_WINDOW_NONE );
XCB_CURRENT_TIME, rofi_view_get_window() );
xcb_flush ( xcb->connection );
}
}

View File

@ -1631,3 +1631,8 @@ void rofi_view_switch_mode ( RofiViewState *state, Mode *mode )
rofi_view_refilter ( state );
rofi_view_update ( state );
}
xcb_window_t rofi_view_get_window ( void )
{
return CacheState.main_window;
}