mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-12-23 22:31:46 +00:00
[client] spice: set absolute position and focus state on Wayland
This commit is contained in:
parent
d68d82e5f7
commit
790c2b39ad
1 changed files with 13 additions and 0 deletions
|
@ -1206,6 +1206,16 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||
handleWindowLeave();
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT_FOCUS_GAINED:
|
||||
if (g_state.wminfo.subsystem != SDL_SYSWM_X11)
|
||||
g_state.focused = true;
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT_FOCUS_LOST:
|
||||
if (g_state.wminfo.subsystem != SDL_SYSWM_X11)
|
||||
g_state.focused = false;
|
||||
break;
|
||||
|
||||
case SDL_WINDOWEVENT_SIZE_CHANGED:
|
||||
case SDL_WINDOWEVENT_RESIZED:
|
||||
if (g_state.wminfo.subsystem != SDL_SYSWM_X11)
|
||||
|
@ -1423,6 +1433,9 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||
if (g_state.wminfo.subsystem == SDL_SYSWM_X11)
|
||||
break;
|
||||
|
||||
g_cursor.pos.x = event->motion.x;
|
||||
g_cursor.pos.y = event->motion.y;
|
||||
|
||||
if (g_cursor.grab)
|
||||
handleMouseGrabbed(event->motion.xrel, event->motion.yrel);
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue