mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-03 08:25:34 +00:00
app: [Wayland] only start resize gesture on pointer down
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+14
-12
@@ -886,18 +886,6 @@ func gio_onPointerButton(data unsafe.Pointer, p *C.struct_wl_pointer, serial, t,
|
||||
switch wbtn {
|
||||
case BTN_LEFT:
|
||||
btn = pointer.ButtonPrimary
|
||||
if _, edge := w.systemGesture(); edge != 0 {
|
||||
w.resize(serial, edge)
|
||||
return
|
||||
}
|
||||
act, ok := w.w.ActionAt(w.lastPos)
|
||||
if ok && w.config.Mode == Windowed {
|
||||
switch act {
|
||||
case system.ActionMove:
|
||||
w.move(serial)
|
||||
return
|
||||
}
|
||||
}
|
||||
case BTN_RIGHT:
|
||||
btn = pointer.ButtonSecondary
|
||||
case BTN_MIDDLE:
|
||||
@@ -916,6 +904,20 @@ func gio_onPointerButton(data unsafe.Pointer, p *C.struct_wl_pointer, serial, t,
|
||||
w.pointerBtns |= btn
|
||||
typ = pointer.Press
|
||||
}
|
||||
if typ == pointer.Press && btn == pointer.ButtonPrimary {
|
||||
if _, edge := w.systemGesture(); edge != 0 {
|
||||
w.resize(serial, edge)
|
||||
return
|
||||
}
|
||||
act, ok := w.w.ActionAt(w.lastPos)
|
||||
if ok && w.config.Mode == Windowed {
|
||||
switch act {
|
||||
case system.ActionMove:
|
||||
w.move(serial)
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
w.flushScroll()
|
||||
w.resetFling()
|
||||
w.w.Event(pointer.Event{
|
||||
|
||||
Reference in New Issue
Block a user