From 294c0f7d89b206612634978e3df166ce532a1118 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 5 Jul 2020 11:53:19 +0200 Subject: Replace grab flag in PuglEventFocus with crossing mode --- pugl/detail/x11.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'pugl/detail/x11.c') 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: -- cgit v1.2.1