mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 11:36:10 +00:00
UI/AppKit: Restore custom cursor shown on link hover
This seems to have broken in some recent-ish AppKit update. When we add the status label to the view hierarchy / change its visibility state, the NSApp is resetting the cursor to the standard cursor. By overriding the cursorUpdate method to do nothing, we prevent this from happening.
This commit is contained in:
parent
b64d450f32
commit
b23b21fa4a
Notes:
github-actions[bot]
2025-04-01 21:11:20 +00:00
Author: https://github.com/trflynn89 Commit: https://github.com/LadybirdBrowser/ladybird/commit/b23b21fa4a4 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4173 Reviewed-by: https://github.com/gmta ✅
1 changed files with 7 additions and 0 deletions
|
@ -1684,6 +1684,13 @@ static void copy_data_to_clipboard(StringView data, NSPasteboardType pasteboard_
|
|||
m_modifier_flags = event.modifierFlags;
|
||||
}
|
||||
|
||||
- (void)cursorUpdate:(NSEvent*)event
|
||||
{
|
||||
// The NSApp will override the custom cursor set from on_cursor_change when the view hierarchy changes in some way
|
||||
// (such as when we show self.status_label on link hover). Overriding this method with an empty implementation will
|
||||
// prevent this from happening. See: https://stackoverflow.com/a/20197686
|
||||
}
|
||||
|
||||
#pragma mark - NSDraggingDestination
|
||||
|
||||
- (NSDragOperation)draggingEntered:(id<NSDraggingInfo>)event
|
||||
|
|
Loading…
Add table
Reference in a new issue