Commit 37d7561 Martin Fox
committed Jan 9, 2024
1 parent 366b062 commit 37d7561 Copy full SHA for 37d7561
File tree 1 file changed +4
-2
lines changed
modules/javafx.graphics/src/main/native-glass/mac
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -810,8 +810,10 @@ - (NSRect) firstRectForCharacterRange:(NSRange)theRange actualRange:(NSRangePoin
810
810
IMLOG (" firstRectForCharacterRange called %lu %lu " ,
811
811
(unsigned long )theRange.location , (unsigned long )theRange.length );
812
812
NSRect result = [self ->_delegate getInputMethodCandidatePosRequest: 0 ];
813
- NSRect screenFrame = [[NSScreen mainScreen ] frame ];
814
- result.origin .y = screenFrame.size .height - result.origin .y ;
813
+ if (NSScreen .screens .count ) {
814
+ NSRect screenFrame = NSScreen .screens [0 ].frame ;
815
+ result.origin .y = screenFrame.size .height - result.origin .y ;
816
+ }
815
817
return result;
816
818
}
817
819
You can’t perform that action at this time.
0 commit comments