Check input_mode to see whether window switcher is active or not

...rather than "if (server->osd_state.cycle_view){..}".
This commit is contained in:
tokyo4j 2024-12-28 17:42:26 +09:00 committed by Johan Malm
parent 398b80b26f
commit 5d3ce3e190
6 changed files with 17 additions and 14 deletions

View file

@ -29,7 +29,8 @@ foreign_request_fullscreen(struct foreign_toplevel *toplevel, bool fullscreen)
void
foreign_request_activate(struct foreign_toplevel *toplevel)
{
if (toplevel->view->server->osd_state.cycle_view) {
if (toplevel->view->server->input_mode
== LAB_INPUT_STATE_WINDOW_SWITCHER) {
wlr_log(WLR_INFO, "Preventing focus request while in window switcher");
return;
}