mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-24 06:41:46 +00:00
[client] fix ignoreQuit on Wayland
On Wayland, SDL_WINDOWEVENT_CLOSE is sent even when exiting with keyboard shortcuts. This meant that the client is still closed even with -Q. We now swallow SDL_WINDOWEVENT_CLOSE if the cursor is inside the VM. This should prevent keyboard shortcuts from closing the client, while still allowing the window to be closed by clicking X with the mouse per #138.
This commit is contained in:
parent
f47c8cb806
commit
c9f41ea69e
1 changed files with 2 additions and 2 deletions
|
@ -1272,8 +1272,8 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// allow a window close event to close the application even if ignoreQuit is set
|
|
||||||
case SDL_WINDOWEVENT_CLOSE:
|
case SDL_WINDOWEVENT_CLOSE:
|
||||||
|
if (!params.ignoreQuit || !g_cursor.inView)
|
||||||
g_state.state = APP_STATE_SHUTDOWN;
|
g_state.state = APP_STATE_SHUTDOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue