mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-22 13:37:22 +00:00
[client] spice: set absolute position and focus state on Wayland
This commit is contained in:
parent
d68d82e5f7
commit
790c2b39ad
@ -1206,6 +1206,16 @@ int eventFilter(void * userdata, SDL_Event * event)
|
|||||||
handleWindowLeave();
|
handleWindowLeave();
|
||||||
break;
|
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_SIZE_CHANGED:
|
||||||
case SDL_WINDOWEVENT_RESIZED:
|
case SDL_WINDOWEVENT_RESIZED:
|
||||||
if (g_state.wminfo.subsystem != SDL_SYSWM_X11)
|
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)
|
if (g_state.wminfo.subsystem == SDL_SYSWM_X11)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
g_cursor.pos.x = event->motion.x;
|
||||||
|
g_cursor.pos.y = event->motion.y;
|
||||||
|
|
||||||
if (g_cursor.grab)
|
if (g_cursor.grab)
|
||||||
handleMouseGrabbed(event->motion.xrel, event->motion.yrel);
|
handleMouseGrabbed(event->motion.xrel, event->motion.yrel);
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user