mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 00:06:44 -04:00
tform: Fix "without" event generation when mouse leaves window
Fixes #1400
This commit is contained in:
parent
8a46c3dc64
commit
ff9ff688be
@ -724,19 +724,14 @@ clear_current_regions() {
|
|||||||
while (old_ri != _current_regions.end()) {
|
while (old_ri != _current_regions.end()) {
|
||||||
// Here's a region we don't have any more.
|
// Here's a region we don't have any more.
|
||||||
MouseWatcherRegion *old_region = (*old_ri);
|
MouseWatcherRegion *old_region = (*old_ri);
|
||||||
old_region->exit_region(param);
|
without_region(old_region, param);
|
||||||
throw_event_pattern(_leave_pattern, old_region, ButtonHandle::none());
|
|
||||||
if (_preferred_region == old_region) {
|
|
||||||
_preferred_region = nullptr;
|
|
||||||
}
|
|
||||||
++old_ri;
|
++old_ri;
|
||||||
}
|
}
|
||||||
|
|
||||||
_current_regions.clear();
|
_current_regions.clear();
|
||||||
|
|
||||||
if (_preferred_region != nullptr) {
|
if (_preferred_region != nullptr) {
|
||||||
_preferred_region->exit_region(param);
|
exit_region(_preferred_region, param);
|
||||||
throw_event_pattern(_leave_pattern, _preferred_region, ButtonHandle::none());
|
|
||||||
_preferred_region = nullptr;
|
_preferred_region = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user