aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-07-04 14:01:56 +0200
committerDavid Robillard <d@drobilla.net>2020-07-04 14:01:56 +0200
commit6a776bb6eeffbe921b657d531c0d48b878d461e9 (patch)
tree67b058a6ef366a7bcbca3b5d87116a7e5fbcd8d4
parent872191736520c8689394ce9ebd91b2f7dfd43f44 (diff)
X11: Fix sign conversion warning
-rw-r--r--pugl/detail/x11.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pugl/detail/x11.c b/pugl/detail/x11.c
index ce9e289..39a4522 100644
--- a/pugl/detail/x11.c
+++ b/pugl/detail/x11.c
@@ -514,10 +514,10 @@ translateKey(PuglView* view, XEvent* xevent, PuglEvent* event)
static uint32_t
translateModifiers(const unsigned xstate)
{
- return (((xstate & ShiftMask) ? PUGL_MOD_SHIFT : 0) |
- ((xstate & ControlMask) ? PUGL_MOD_CTRL : 0) |
- ((xstate & Mod1Mask) ? PUGL_MOD_ALT : 0) |
- ((xstate & Mod4Mask) ? PUGL_MOD_SUPER : 0));
+ return (((xstate & ShiftMask) ? PUGL_MOD_SHIFT : 0u) |
+ ((xstate & ControlMask) ? PUGL_MOD_CTRL : 0u) |
+ ((xstate & Mod1Mask) ? PUGL_MOD_ALT : 0u) |
+ ((xstate & Mod4Mask) ? PUGL_MOD_SUPER : 0u));
}
static PuglEvent