octgn / OCTGN

Online Card and Tabletop Gaming Network
http://www.octgn.net
Other
359 stars 129 forks source link

card selection rectangle doesn't clear if you alt-tab away from game window #1784

Closed brine closed 6 years ago

brine commented 6 years ago

to replicate: start drawing a selection rectangle, then alt-tab while still holding down left mouse button. When you return to the game window, the selection box will be static on the screen and cannot be cleared.

The MouseUp event never fires, which I assume is where the rectangle adorner layer is cleared.

I'm not sure if we can set up an event which triggers when we lose focus of the window. If not, a possible solution is to have the MouseDown event clear any existing adorners prior to drawing a new one.

kellyelton commented 6 years ago

I'm positive there is an event for when the window loses focus.