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