RFR: 8242544: CMD+ENTER key event crashes the application when invoked on dialog [v2]
Martin Fox
duke at openjdk.java.net
Wed Jan 12 18:39:39 UTC 2022
On Wed, 12 Jan 2022 18:23:20 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> modules/javafx.graphics/src/main/native-glass/mac/GlassWindow.m line 847:
>>
>>> 845: {
>>> 846: // If the contentView is set to nil within performKeyEquivalent: the OS will crash.
>>> 847: NSView* dummy = [[NSView alloc] initWithFrame: NSMakeRect(0, 0, 10, 10)];
>>
>> The view could be also created with a (0, 0, 0, 0) rect, couldn't it?
>
> I don't know. I'm always skeptical of 0 size rectangles. I'd either leave it as-is or maybe use a `(0,0,1,1)` rectangle.
The initial size should not matter since it will be re-sized to the window's content bounds. But I would rather avoid doing something unusual like creating a 0-sized NSView even though it almost certainly will work.
-------------
PR: https://git.openjdk.java.net/jfx/pull/714
More information about the openjfx-dev
mailing list