Skip to content

Fix gesture preview crash on macOS 12#3

Merged
aaronkollasch merged 1 commit intomainfrom
fix-preview-crash
Nov 23, 2021
Merged

Fix gesture preview crash on macOS 12#3
aaronkollasch merged 1 commit intomainfrom
fix-preview-crash

Conversation

@aaronkollasch
Copy link
Copy Markdown
Collaborator

[NSView lockFocus] was deprecated in macOS 10.14 and seems to be removed on 12.0.
This PR prevents the prefpane from crashing while trying to show the gesture preview window. It uses a single background color as a substitute for a drawn background, though it is not as pretty.
imageWithSize:flipped:drawingHandler is a potential replacement for lockFocus, e.g.

NSImage *bg = [NSImage imageWithSize:[self frame].size
                                 flipped:NO
                          drawingHandler:???];

Pull request submitted upstream: #4

[NSView lockFocus] was deprecated in macOS 10.14 and seems to be removed on 12.0
http://codeworkshop.net/objc-diff/sdkdiffs/macos/10.14/AppKit.html
A static background color is a viable substitute, though not as pretty.
@aaronkollasch aaronkollasch merged commit 433f9f1 into main Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant