diff options
| author | TellowKrinkle <tellowkrinkle@gmail.com> | 2022-08-12 03:06:33 -0500 |
|---|---|---|
| committer | TellowKrinkle <tellowkrinkle@gmail.com> | 2022-08-18 16:29:43 -0500 |
| commit | 588c4bd6355f20dd74008054b1bb876810f4ba13 (patch) | |
| tree | 84ad0eb5f4878533e0223714ad8e5a6793ca445a /Source/Core/InputCommon/ControllerInterface/Quartz | |
| parent | 798b241832270bcb7fbc35b07bc297a288e64372 (diff) | |
InputCommon:QuarzKB&M: Use view position instead of window position
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/Quartz')
| -rw-r--r-- | Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm index 9b82ef591c..a610956d93 100644 --- a/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm +++ b/Source/Core/InputCommon/ControllerInterface/Quartz/QuartzKeyboardAndMouse.mm @@ -23,6 +23,7 @@ @implementation DolWindowPositionObserver { + NSView* _view; NSWindow* _window; NSRect _frame; std::mutex _mtx; @@ -30,7 +31,7 @@ - (NSRect)calcFrame { - return [_window frame]; + return [_window convertRectToScreen:[_view frame]]; } - (instancetype)initWithView:(NSView*)view @@ -38,6 +39,7 @@ self = [super init]; if (self) { + _view = view; _window = [view window]; _frame = [self calcFrame]; [_window addObserver:self forKeyPath:@"frame" options:0 context:nil]; |
