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
+4 -2
View File
@@ -293,7 +293,8 @@ func (h *x11EventHandler) handleEvents() bool {
X: float32(bevt.x),
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 {
ev.Type = pointer.Release
@@ -336,7 +337,8 @@ func (h *x11EventHandler) handleEvents() bool {
X: float32(mevt.x),
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
// redraw only on the last expose event