~eliasnaur/gio

9da54eac61b525f3c67886549983cec31bf5dcb9 — Elias Naur a month ago f6dff2f
app/internal/window: [X11] report key modifiers for pointer events

Fixes #120

Signed-off-by: Elias Naur <mail@eliasnaur.com>
1 files changed, 4 insertions(+), 2 deletions(-)

M app/internal/window/os_x11.go
M app/internal/window/os_x11.go => app/internal/window/os_x11.go +4 -2
@@ 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