Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange doubleclick on title behavior #1657

Closed
winteriscariot opened this issue Mar 24, 2024 · 7 comments · Fixed by #1659
Closed

Strange doubleclick on title behavior #1657

winteriscariot opened this issue Mar 24, 2024 · 7 comments · Fixed by #1659
Labels
bug Something isn't working help wanted Extra attention is needed UX User Experience issues
Milestone

Comments

@winteriscariot
Copy link

winteriscariot commented Mar 24, 2024

So this is a bit of a weird one, but I noticed this today.

I currently have the following mousebind set:

<context name="Title">
  <mousebind button="Left" action="DoubleClick">
    <action name="Iconify"/>
  </mousebind>
  [...]

ie, doubleclick titlebar to minimize

however, I noticed that labwc seems to register any click within the application itself as a titlebar click, so long as the second click ends on the titlebar. so for instance, if I have featherpad open, I can click in the empty space next to the toolbar icons, then very quickly move my mouse to the titlebar and click a second time. if done fast enough (within the double click time window) this causes the window to iconify.

it appears that labwc is reading that first click, the one within the application content, as a click on the titlebar. double clicking within the application context (so the second click is not on the titlebar) behaves as expected.

latest labwc git (11b6836) on arch

@winteriscariot winteriscariot changed the title Issue with DoubleClick action Strange doubleclick on title behavior Mar 24, 2024
@Consolatis
Copy link
Member

Consolatis commented Mar 24, 2024

Yes, AFAIR we indeed only use the cursor position of the second click to determine the target.
Is this something that results in unwanted behavior? E.g. is this an issue outside of manually reproducing it?

If yes we could potentially store the first target and on the 2nd click compare the two targets and if they differ do not call the bound action.

@Consolatis Consolatis added the UX User Experience issues label Mar 24, 2024
@winteriscariot
Copy link
Author

The only reason I noticed this behavior is because it was unexpected, and a window disappeared when I didn't expect it to. This is also not the way it behaves in openbox, fwiw, so maybe worth restricting it to the titlebar imo.

@winteriscariot
Copy link
Author

winteriscariot commented Mar 25, 2024

iirc, the first time i noticed, I had clicked something in the window, then immediately went to drag it, but it disappeared instead.

so in my particular case, could maybe not register that second click if it's a click-and-hold?

@Consolatis
Copy link
Member

iirc, the first time i noticed, I had clicked something in the window, then immediately went to drag it, but it disappeared instead.

That sounds like something that totally can happen. Lets fix this.

@Consolatis Consolatis added bug Something isn't working help wanted Extra attention is needed labels Mar 25, 2024
@Consolatis Consolatis added this to the 0.7.2 milestone Mar 25, 2024
@tokyo4j
Copy link
Contributor

tokyo4j commented Mar 25, 2024

I experienced this problem too when I first started using labwc. Setting <mouse><doubleClickTime> (default is 500) to 200 mitigated this, but more sophisticated solution would be ideal.

johanmalm added a commit to johanmalm/labwc that referenced this issue Mar 25, 2024
...because click on different parts of a client should not be
interpreted as a double click.

Previously only cursor-button and view were validated to be the same
between clicks. This resulted in, for example a click on the client
surface itself quickly followed by a click on the SSD titlebar being
interpreted as a double-click on the titlebar.

Fixes: labwc#1657
@johanmalm
Copy link
Collaborator

Does #1659 solve this?

Consolatis pushed a commit that referenced this issue Mar 28, 2024
...because click on different parts of a client should not be
interpreted as a double click.

Previously only cursor-button and view were validated to be the same
between clicks. This resulted in, for example a click on the client
surface itself quickly followed by a click on the SSD titlebar being
interpreted as a double-click on the titlebar.

Fixes: #1657
@Consolatis
Copy link
Member

Consolatis commented Mar 28, 2024

Should be fixed in latest master. Thanks for bringing this up.

grisha128 pushed a commit to grisha128/labwc that referenced this issue Apr 19, 2024
...because click on different parts of a client should not be
interpreted as a double click.

Previously only cursor-button and view were validated to be the same
between clicks. This resulted in, for example a click on the client
surface itself quickly followed by a click on the SSD titlebar being
interpreted as a double-click on the titlebar.

Fixes: labwc#1657
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed UX User Experience issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants