app/internal/window: [X11] report key modifiers for pointer events

Fixes #120

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2020-05-27 16:38:31 +02:00
parent f6dff2fd1c
commit 9da54eac61
+2
View File
@@ -294,6 +294,7 @@ func (h *x11EventHandler) handleEvents() bool {
Y: float32(bevt.y), Y: float32(bevt.y),
}, },
Time: time.Duration(bevt.time) * time.Millisecond, Time: time.Duration(bevt.time) * time.Millisecond,
Modifiers: w.xkb.Modifiers(),
} }
if bevt._type == C.ButtonRelease { if bevt._type == C.ButtonRelease {
ev.Type = pointer.Release ev.Type = pointer.Release
@@ -337,6 +338,7 @@ func (h *x11EventHandler) handleEvents() bool {
Y: float32(mevt.y), Y: float32(mevt.y),
}, },
Time: time.Duration(mevt.time) * time.Millisecond, Time: time.Duration(mevt.time) * time.Millisecond,
Modifiers: w.xkb.Modifiers(),
}) })
case C.Expose: // update case C.Expose: // update
// redraw only on the last expose event // redraw only on the last expose event