Skip to content

Fix slider dragging when leaving window #14187

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dunkmann00
Copy link

@dunkmann00 dunkmann00 commented Feb 22, 2025

There seems to be a bug on macOS where even when the left mouse button is pressed, if you drag the cursor out of the main window, the button will read as not pressed. This will end a drag gesture, which causes unwanted behavior with the layer & gcode sliders if they are still being dragged.

This commit checks if the event is a 'leaving' event, and if so, will use the prior update call's left mouse down state. This avoids the erroneous reading and maintains the drag, if there was one.

Fixes #12879

@dunkmann00
Copy link
Author

Before 👎

Screen.Recording.2025-02-21.at.8.18.40.PM.mov

After 👍

Screen.Recording.2025-02-21.at.8.20.11.PM.mov

@mottscanley
Copy link

This should be merged ASAP. So incredibly annoying bug and so simple fix.

@dunkmann00
Copy link
Author

@lukasmatena Has this PR been reviewed? It would be appreciated to at least get feedback if this is something the Prusa devs are looking to fix?

There seems to be a bug on macOS where even when the left mouse button
is pressed, if you drag the cursor out of the main window, the button
will read as not pressed. This will end a drag gesture, which causes
unwanted behavior with the layer & gcode sliders if they are still being
dragged.

This commit checks if the event is a 'leaving' event, and if so, will
use the prior update call's left mouse down state. This avoids the
erroneous reading and maintains the drag, if there was one.
@dunkmann00
Copy link
Author

@SachCZ Is there any update on whether this PR has been looked over?

Thanks.

@adamdport
Copy link

@rtyr

@SachCZ
Copy link
Collaborator

SachCZ commented Apr 14, 2025

As of now we do not want to merge this. In any case I have checked the code. It looks sane and it is an easy enough change. We will hopefully get back to this in the future.

@dunkmann00
Copy link
Author

dunkmann00 commented Apr 15, 2025

Understood. I certainly hope the team realizes this is quite an annoying bug for us macOS users. Given the linked issue is from 10 months ago combined with the wording of your last sentence, it does not instill much confidence this is the case. We will have to wait and see.

Nonetheless, thank you for providing feedback and for all the work that you put into maintaining PrusaSlicer!

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.

GCode slider stops working when cursor leaves window
4 participants