RFR: 8254841: [macos] Enter and Exit events shouldn't be sent whilst resizing [v5]

Alisen Chung github.com+90066231+alisenchung at openjdk.java.net
Wed Sep 22 08:28:55 UTC 2021


On Tue, 21 Sep 2021 22:49:04 GMT, Phil Race <prr at openjdk.org> wrote:

>> src/java.desktop/macosx/native/libawt_lwawt/awt/AWTWindow.m line 659:
>> 
>>> 657:     if (![self.nsWindow inLiveResize]) {
>>> 658:         [AWTWindow synthesizeMouseEnteredExitedEventsForAllWindows];
>>> 659:     }
>> 
>> Are you sure that inLiveResize is only set when the user resizes the window? What happens if the user will move the window to the fullscreen or maximize it(by clicking on the title/buttons), will the inLiveResize be set to true or not?
>
> The docs seem to me to be saying it is only when the user is dragging :
> https://developer.apple.com/documentation/appkit/nsview/1483267-inliveresize?language=objc

When the user maximizes the window a mouseEntered event does fire, so it preserves the fix for JDK-8028485. But I noticed another problem is that a mouseEntered event will be generated if the window is dragged around (without resizing or entering the actual window). This could cause a situation where you can drag a window around to create a mouseEntered event, move the mouse away from the window, and re-enter the window without generating a mouseEntered event.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5497



More information about the client-libs-dev mailing list