]> git.mdlowis.com Git - proto/labwc.git/commit
cursor: Don't allow a DRAG action to start from a double-click
authorJohn Lindgren <john@jlindgren.net>
Sat, 8 Jan 2022 07:01:14 +0000 (02:01 -0500)
committerJohan Malm <johanmalm@users.noreply.github.com>
Sat, 8 Jan 2022 09:31:53 +0000 (09:31 +0000)
commit7f8b7f0a5620babd2924c074fa4674692c19ff43
tree553b6222143aee7209425dbc51b7d944f5e19320
parentae43d4b9d1c8fb1a758fa9f212f629a72e6d7c27
cursor: Don't allow a DRAG action to start from a double-click

By moving the cursor slightly after the second press (but before
the second release) it was possible to accidentally trigger both a
DOUBLECLICK and a DRAG action.  Doing this on the titlebar would
cause the window to maximize and then immediately unmaximize, which
feels very "glitchy".

As a simple fix, don't allow a press event that is triggering a
DOUBLECLICK to also trigger a DRAG (or CLICK) on the following
release event.

Note: Openbox avoids the issue by processing DOUBLECLICK on the
second release event.  If the cursor moves before that, the DRAG
wins out and the DOUBLECLICK isn't processed.
src/cursor.c