mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
cocoa: fix broken mouse events in fullscreen on macOS (LP 1500026)
This commit is contained in:
parent
925ce854d0
commit
8b3ad7348e
@ -277,8 +277,22 @@ process_events() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we're in fullscreen mode, send mouse events directly to the window.
|
||||||
|
NSEventType type = [event type];
|
||||||
|
if (_properties.get_fullscreen() && (
|
||||||
|
type == NSLeftMouseDown || type == NSLeftMouseUp ||
|
||||||
|
type == NSRightMouseDown || type == NSRightMouseUp ||
|
||||||
|
type == NSOtherMouseDown || type == NSOtherMouseUp ||
|
||||||
|
type == NSLeftMouseDragged ||
|
||||||
|
type == NSRightMouseDragged ||
|
||||||
|
type == NSOtherMouseDragged ||
|
||||||
|
type == NSMouseMoved ||
|
||||||
|
type == NSScrollWheel)) {
|
||||||
|
[_window sendEvent: event];
|
||||||
|
} else {
|
||||||
[NSApp sendEvent: event];
|
[NSApp sendEvent: event];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (_window != nil) {
|
if (_window != nil) {
|
||||||
[_window update];
|
[_window update];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user