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

GCode slider stops working when cursor leaves window #12879

Open
2 tasks done
dunkmann00 opened this issue Jun 21, 2024 · 5 comments · May be fixed by #14187
Open
2 tasks done

GCode slider stops working when cursor leaves window #12879

dunkmann00 opened this issue Jun 21, 2024 · 5 comments · May be fixed by #14187

Comments

@dunkmann00
Copy link

Description of the bug

When dragging the GCode slider (the one on the bottom), if the mouse happens to leave the PrusaSlicer window it will stop traversing through the GCode and start rotating the view instead. I would expect it to continue to traverse the GCode as long as the mouse button is still pressed.

This behavior is not present on 2.7.4.

Project file & How to reproduce

2.8.0-beta1

Screen.Recording.2024-06-21.at.7.40.48.PM.mov

2.7.4

Screen.Recording.2024-06-21.at.7.44.03.PM.mov

SliderColorChangeBugReport.3mf.zip

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

PrusaSlicer-2.8.0-beta1+MacOS-universal-202406212048

Operating system

macOS 14.4

Printer model

MK4

@dunkmann00
Copy link
Author

It seems my original assessment was not completely correct. I'm only seeing this happen when quickly moving the mouse off the screen (which was happening when I scrolled through the GCode quickly). But if I slowly move the mouse out of the window the problem does not happen.

I am also now noticing that if I drag the bottom GCode bar's handle all the way to completion (at the right) and then try to drag it backwards, it does not work unless the mouse is inside the scroll handle. If it is above it, it will stop moving, but can be reactivated by moving the mouse inside the handle.

@dunkmann00
Copy link
Author

Is this something that has gotten any attention? I can still report that as of 2.9.0 this bug still persists. If I drag either the layer change slider or the gcode slider and my mouse happens to go off screen, the slider stops moving and the bed starts moving. I know it isn't a blocking bug, but it is very annoying.

@dunkmann00
Copy link
Author

After trying to figure out whats going on I think I have it narrowed down to the point I can share something here that might help.

It seems that ImGui doesn't want the mouse events when the mouse leaves the Application window, even when the mouse is already pressed down. I don't know if that is intended behavior or not but it seems thats what is happening. Here is where that is happening:

if (ImGuiPureWrap::want_mouse())
new_frame();
return ImGuiPureWrap::want_mouse();

@dunkmann00
Copy link
Author

I also was finally able to test this on Windows and the problem does not happen.

@dunkmann00
Copy link
Author

I think I've figured out what is happening! It seems, on mac anyway, the wxMouseEvent incorrectly says the left mouse button is not pressed, even if it is, when in the leaving state. The leaving state happens when the cursor moves out of the window, and at least from my testing is only ever active for one update pass.

I'll put a PR together to try to handle this.

@dunkmann00 dunkmann00 linked a pull request Feb 22, 2025 that will close this issue
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 a pull request may close this issue.

1 participant