Bramas / Ultratools

Editor for Ultrastar songs
5 stars 5 forks source link

Can't use left mouse button on RichHScrollBar #2

Open s09bQ5 opened 8 years ago

s09bQ5 commented 8 years ago

Due to my window manager's (Fluxbox) implementation of click to focus, there is an enterEvent for every left button click even if the mouse was already inside the widget. This resets _overType to OverNothing because of 0d930fe18cd79.

It is unclear to me what 0d930fe18cd79 tries to improve by adding enterEvent and leaveEvent. If I remove the overriding methods, everything works fine and I am also no longer restricted to the application window when resizing the visible region with the right mouse button.

Bramas commented 8 years ago

Thanks for the detailed comment. I don't remember why exactly I added this events. Maybe, because if we leave the widget while overing some object, the object still look like it is overed. If this is the case, then only the leaveEvent is needed, so that we can remove the enterEvent, and everything should work with Fluxbox.

s09bQ5 commented 8 years ago

I think the correct way to fix this is to set _overType one last time in mousePressEvent before it is locked by _mousePressed. If it works, I'll make a commit to my tree.

Bramas commented 8 years ago

you're totally right, that's the solution.