Properly update the entire mouse state.
When a window closes, not only update the mouse position but also the button status.
This commit is contained in:
parent
db4ff78b99
commit
84f3d21f18
2 changed files with 3 additions and 1 deletions
|
@ -662,6 +662,8 @@ void tdistributor::initialize_state()
|
|||
tmouse_button_left::initialize_state(button_state & SDL_BUTTON(1));
|
||||
tmouse_button_middle::initialize_state(button_state & SDL_BUTTON(2));
|
||||
tmouse_button_right::initialize_state(button_state & SDL_BUTTON(3));
|
||||
|
||||
init_mouse_location();
|
||||
}
|
||||
|
||||
void tdistributor::keyboard_capture(twidget* widget)
|
||||
|
|
|
@ -386,7 +386,7 @@ void thandler::disconnect(tdispatcher* dispatcher)
|
|||
dynamic_cast<twidget&>(*dispatcher).set_dirty();
|
||||
}
|
||||
|
||||
init_mouse_location();
|
||||
activate();
|
||||
|
||||
/***** Validate post conditions. *****/
|
||||
assert(std::find(dispatchers_.begin(), dispatchers_.end(), dispatcher)
|
||||
|
|
Loading…
Add table
Reference in a new issue