aboutsummaryrefslogtreecommitdiffstats
path: root/pugl/detail/x11.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-05 11:53:19 +0200
committerDavid Robillard <d@drobilla.net>2020-07-05 16:22:16 +0200
commit294c0f7d89b206612634978e3df166ce532a1118 (patch)
tree35e37daf6cb29281ce1f24ff6b06b08e4700be70 /pugl/detail/x11.c
parenteac255d8dac99bc25140c8c0a81cad5926ebdefd (diff)
downloadpugl-294c0f7d89b206612634978e3df166ce532a1118.tar.gz
pugl-294c0f7d89b206612634978e3df166ce532a1118.tar.bz2
pugl-294c0f7d89b206612634978e3df166ce532a1118.zip
Replace grab flag in PuglEventFocus with crossing mode
Diffstat (limited to 'pugl/detail/x11.c')
-rw-r--r--pugl/detail/x11.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index 12efc43..1cd76f7 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -644,7 +644,12 @@ translateEvent(PuglView* view, XEvent xevent)
case FocusIn:
case FocusOut:
event.type = (xevent.type == FocusIn) ? PUGL_FOCUS_IN : PUGL_FOCUS_OUT;
- event.focus.grab = (xevent.xfocus.mode != NotifyNormal);
+ event.focus.mode = PUGL_CROSSING_NORMAL;
+ if (xevent.xfocus.mode == NotifyGrab) {
+ event.focus.mode = PUGL_CROSSING_GRAB;
+ } else if (xevent.xfocus.mode == NotifyUngrab) {
+ event.focus.mode = PUGL_CROSSING_UNGRAB;
+ }
break;
default: