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

Update wincmd.c #78

Merged
merged 1 commit into from
Aug 25, 2024
Merged

Update wincmd.c #78

merged 1 commit into from
Aug 25, 2024

Conversation

kurokawachan
Copy link
Contributor

Fixing issue

#77

@ib
Copy link
Member

ib commented Aug 23, 2024

Please note that

  • you could add the GDK_BUTTON_PRESS check to if (event->button == 1).
  • you still get two GDK_BUTTON_PRESS events.

In your commit, you should briefly explain what you changed and why. This will make it easier to understand later.

@kurokawachan
Copy link
Contributor Author

kurokawachan commented Aug 25, 2024

Thanks,

you could add the GDK_BUTTON_PRESS check to if (event->button == 1).

Yes, it make sense

you still get two GDK_BUTTON_PRESS events

Yes, and it is the right behavior.
What we are trying to avoid is this function being trigger by GDK_2BUTTON_PRESS events.

If we click the toggle too fast, an GDK_2BUTTON_PRESS would be triggered.
If we click the toggle Not fast, no GDK_2BUTTON_PRESS would be triggered.

You could take a look at here

I believe this toggle should only toggle on and off, double click does not make sense.

I would draft another pull request.

kurokawachan added a commit to kurokawachan/lxpanel that referenced this pull request Aug 25, 2024
@kurokawachan
Copy link
Contributor Author

Hello @ib I just updated the GDK_BUTTON_PRESS check as you requested.

If the toggle is clicked too quickly, it is considered a double-click
and three button-press events are generated instead of the usual two,
resulting in unwanted behavior.

This fixes lxde#77.
@ib
Copy link
Member

ib commented Aug 25, 2024

I was thinking of something more straightforward and easier to understand.

You gave the description in your issue and pull request comments, but that should go in the commit message.

I have edited your patch. If you agree with it, I'll apply it.

@kurokawachan
Copy link
Contributor Author

Hello, please do. Thanks

@ib ib merged commit ffd815f into lxde:master Aug 25, 2024
@ib
Copy link
Member

ib commented Aug 25, 2024

Thank you very much for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants