mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-21 18:01:15 +00:00
[qwaq] Fix the handling of overlapping views
This even simplifies the logic for mouse enter/leave handling, a nice bonus.
This commit is contained in:
parent
8b193c6b6c
commit
622b5f4c45
1 changed files with 4 additions and 8 deletions
|
@ -137,15 +137,11 @@ find_mouse_view(Group *group, Point pos)
|
|||
if (mouse_grabbed) {
|
||||
[mouse_grabbed handleEvent: event];
|
||||
} else {
|
||||
if (mouse_within && ![mouse_within containsPoint: pos]) {
|
||||
View *mouse_view = find_mouse_view (self, pos);
|
||||
if (mouse_within != mouse_view) {
|
||||
[mouse_within onMouseLeave: pos];
|
||||
mouse_within = nil;
|
||||
}
|
||||
if (!mouse_within) {
|
||||
mouse_within = find_mouse_view (self, pos);
|
||||
if (mouse_within) {
|
||||
[mouse_within onMouseEnter: pos];
|
||||
}
|
||||
[mouse_view onMouseEnter: pos];
|
||||
mouse_within = mouse_view;
|
||||
}
|
||||
if (mouse_within) {
|
||||
[mouse_within handleEvent: event];
|
||||
|
|
Loading…
Reference in a new issue