christolliday / limn

Experimental cross platform GUI library
Other
404 stars 19 forks source link

MouseUp event processing #27

Open VladimirMarkelov opened 6 years ago

VladimirMarkelov commented 6 years ago

While trying demos I ran into a small issue. It is not a major one but I think it can be improved. The good example is a slider widget. Start moving thumb of a slider and move a mouse pointer beyond the widget. Widget stops getting events. Now release mouse button. But mouse is still stuck to the slider widget: try moving mouse without clicking and you see that thumb is moving when you move mouse over the slider. It works this way until you do mouse click. As I see in the code, mouse release event is processed only if the cursor is over the widget that has got mouse down event before. It is checked to generate OnClick event. From my point of view(and UI that I tried before does this way), mouse release must be processed always but in case of the cursor is not withing the old widget are then just untie mouse from widget(under_mose = None?).