Cleanup previous PR

This commit is contained in:
Kovid Goyal 2022-02-18 13:44:25 +05:30
parent 702bb2cd06
commit fdc9835587
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 11 additions and 11 deletions

View File

@ -144,9 +144,9 @@ Detailed list of changes
- Add an option :opt:`wheel_scroll_min_lines` to set the minimum number of lines for mouse wheel scrolling when using a mouse with a wheel that generates very small offsets when slow scrolling (:pull:`4710`)
- macOS: Allows to configure the toggle fullscreen shortcut in global menu. (:pull:`4714`)
- macOS: Make the shortcut to toggle full screen configurable (:pull:`4714`)
- macOS: Fix the mouse cursor being set to arrow after switching desktops or toggling fullscreen. (:pull:`4716`)
- macOS: Fix the mouse cursor being set to arrow after switching desktops or toggling full screen (:pull:`4716`)
0.24.2 [2022-02-03]

View File

@ -155,7 +155,7 @@ typedef struct _GLFWwindowNS
bool renderFrameRequested;
GLFWcocoarenderframefun renderFrameCallback;
// update cursor after switching desktops with Mission Control
bool initialCursorUpdateRequested;
bool delayed_cursor_update_requested;
} _GLFWwindowNS;
typedef struct _GLFWDisplayLinkNS

View File

@ -582,7 +582,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
}
- (instancetype)initWithGlfwWindow:(_GLFWwindow *)initWindow;
- (void)requestInitialCursorUpdate:(id)sender;
- (void)request_delayed_cursor_update:(id)sender;
@end
@ -695,7 +695,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
}
// macOS will send a delayed event to update the cursor to arrow after switching desktops.
// So we need to delay and update the cursor once after that.
[self performSelector:@selector(requestInitialCursorUpdate:) withObject:nil afterDelay:0.3];
[self performSelector:@selector(request_delayed_cursor_update:) withObject:nil afterDelay:0.3];
}
- (void)windowDidResignKey:(NSNotification *)notification
@ -726,10 +726,10 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
}
}
- (void)requestInitialCursorUpdate:(id)sender
- (void)request_delayed_cursor_update:(id)sender
{
(void)sender;
if (window) window->ns.initialCursorUpdateRequested = true;
if (window) window->ns.delayed_cursor_update_requested = true;
}
- (void)windowWillEnterFullScreen:(NSNotification *)notification
@ -742,7 +742,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
{
(void)notification;
if (window) window->ns.in_fullscreen_transition = false;
[self performSelector:@selector(requestInitialCursorUpdate:) withObject:nil afterDelay:0.3];
[self performSelector:@selector(request_delayed_cursor_update:) withObject:nil afterDelay:0.3];
}
- (void)windowWillExitFullScreen:(NSNotification *)notification
@ -755,7 +755,7 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
{
(void)notification;
if (window) window->ns.in_fullscreen_transition = false;
[self performSelector:@selector(requestInitialCursorUpdate:) withObject:nil afterDelay:0.3];
[self performSelector:@selector(request_delayed_cursor_update:) withObject:nil afterDelay:0.3];
}
@end // }}}
@ -941,8 +941,8 @@ static const NSRange kEmptyRange = { NSNotFound, 0 };
window->ns.cursorWarpDeltaX = 0;
window->ns.cursorWarpDeltaY = 0;
if (window->ns.initialCursorUpdateRequested) {
window->ns.initialCursorUpdateRequested = false;
if (window->ns.delayed_cursor_update_requested) {
window->ns.delayed_cursor_update_requested = false;
if (cursorInContentArea(window)) updateCursorImage(window);
}
}