mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 05:27:20 +00:00
[client] app: add new app_handleCloseEvent for displayserver backends
This commit is contained in:
parent
89a6686349
commit
31c42e3676
@ -38,6 +38,7 @@ void app_handleMouseBasic(void);
|
||||
void app_handleWindowEnter(void);
|
||||
void app_handleWindowLeave(void);
|
||||
void app_handleFocusEvent(bool focused);
|
||||
void app_handleCloseEvent(void);
|
||||
|
||||
void app_clipboardRelease(void);
|
||||
void app_clipboardNotify(const LG_ClipboardData type, size_t size);
|
||||
|
@ -151,6 +151,12 @@ void app_handleFocusEvent(bool focused)
|
||||
g_state.ds->realignPointer();
|
||||
}
|
||||
|
||||
void app_handleCloseEvent(void)
|
||||
{
|
||||
if (!params.ignoreQuit || !g_cursor.inView)
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
}
|
||||
|
||||
static void alignToGuest(void)
|
||||
{
|
||||
if (SDL_HasEvent(e_SDLEvent))
|
||||
@ -1372,8 +1378,7 @@ int eventFilter(void * userdata, SDL_Event * event)
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT_CLOSE:
|
||||
if (!params.ignoreQuit || !g_cursor.inView)
|
||||
g_state.state = APP_STATE_SHUTDOWN;
|
||||
app_handleCloseEvent();
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user