aboutsummaryrefslogtreecommitdiffstats
path: root/pugl
diff options
context:
space:
mode:
Diffstat (limited to 'pugl')
-rw-r--r--pugl/detail/mac.m1
-rw-r--r--pugl/detail/win.c1
-rw-r--r--pugl/detail/x11.c4
-rw-r--r--pugl/pugl.h4
4 files changed, 5 insertions, 5 deletions
diff --git a/pugl/detail/mac.m b/pugl/detail/mac.m
index 50c52c5..23671ae 100644
--- a/pugl/detail/mac.m
+++ b/pugl/detail/mac.m
@@ -379,7 +379,6 @@ handleCrossing(PuglWrapperView* view, NSEvent* event, const PuglEventType type)
rloc.x,
[[NSScreen mainScreen] frame].size.height - rloc.y,
getModifiers(event),
- 0,
};
puglDispatchEvent(puglview, (const PuglEvent*)&ev);
diff --git a/pugl/detail/win.c b/pugl/detail/win.c
index ee690c4..7ec02ab 100644
--- a/pugl/detail/win.c
+++ b/pugl/detail/win.c
@@ -639,7 +639,6 @@ handleMessage(PuglView* view, UINT message, WPARAM wParam, LPARAM lParam)
event.motion.xRoot = pt.x;
event.motion.yRoot = pt.y;
event.motion.state = getModifiers();
- event.motion.isHint = false;
break;
case WM_MOUSELEAVE:
GetCursorPos(&pt);
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index b06f940..c2e7f6a 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -573,7 +573,9 @@ translateEvent(PuglView* view, XEvent xevent)
event.motion.xRoot = xevent.xmotion.x_root;
event.motion.yRoot = xevent.xmotion.y_root;
event.motion.state = translateModifiers(xevent.xmotion.state);
- event.motion.isHint = (xevent.xmotion.is_hint == NotifyHint);
+ if (xevent.xmotion.is_hint == NotifyHint) {
+ event.motion.flags |= PUGL_IS_HINT;
+ }
break;
case ButtonPress:
if (xevent.xbutton.button >= 4 && xevent.xbutton.button <= 7) {
diff --git a/pugl/pugl.h b/pugl/pugl.h
index 8c0bd6d..c32a17d 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -221,7 +221,8 @@ typedef enum {
Common flags for all event types.
*/
typedef enum {
- PUGL_IS_SEND_EVENT = 1 ///< Event is synthetic
+ PUGL_IS_SEND_EVENT = 1, ///< Event is synthetic
+ PUGL_IS_HINT = 2 ///< Event is a hint (not direct user input)
} PuglEventFlag;
/**
@@ -474,7 +475,6 @@ typedef struct {
double xRoot; ///< Root-relative X coordinate
double yRoot; ///< Root-relative Y coordinate
PuglMods state; ///< Bitwise OR of #PuglMod flags
- bool isHint; ///< True iff this event is a motion hint
} PuglEventMotion;
/**