-
-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Window maximizes with single click (should be double click) #637
Comments
Does this only happen when using FlatLaf? I have also had issues (see #621) where a Mac trackpad is causing invalid mouse events, but this is unrelated to FlatLaf. |
I've only seen it with FlatLaf. |
Some more data points:
|
Thanks for the detailed information 👍 Tried to reproduce, but works for me. I'm running CentOS in VirtualBox on Win11 using Magic Trackpad Model 2011 connected to Win11 via https://magicutilities.net/. Maybe it is related to VNC/remote access... Could you please check, for trackpad single tap, the return value of
I'm also interested in the value of field Maybe changing this line:
to |
…fully started before maximizing window in mouseClicked() (issue #637)
I've added suggested change from previous post to main branch. Could you please try latest |
Looks like it is still an issue. I may have some time at the end of next week to look further into this (since I can easily reproduce). |
On Linux (at least CentOS with Gnome 3) single clicking the header of the main frame will maximize/restore the frame. This should only happen on a double click.
The problem seems to be that sometimes the click event is sent to the
FlatTitlePane.Handler
and sometimes it isn't. This only seems to be an issue when using a trackpad with tap to click on a single tap. Clicking the trackpad or using a mouse seem to work as expected. Here are the events passed to the handler'smousePressed
andmouseClicked
methods for the various input methods. In case it makes a difference, I'm testing this via HP ZCentral Remote Boost to a remote linux instance using a Mac OS 13.1 client with a Magic Trackpad (original, not the 2nd).Trackpad Single Tap
pressed at 1673293639029 with e.getClickCount 1 and clickCount 1
clicked at 1673293639040 with e.getClickCount 1 // <-- This click event triggers the maximize/restore erroneously
Trackpad Single Click
pressed at 1673293654677 with e.getClickCount 1 and clickCount 1
// No click event sent to the handler
Mouse Single Click
pressed at 1673293672853 with e.getClickCount 1 and clickCount 1
// No click event sent to the handler
Trackpad Double Tap
pressed at 1673293689761 with e.getClickCount 1 and clickCount 1
clicked at 1673293689762 with e.getClickCount 1 // <-- This click event triggers the maximize/restore early
// Only if the title bar stays at the top will you get the second press/click events
pressed at 1673293689907 with e.getClickCount 2 and clickCount 2
clicked at 1673293689908 with e.getClickCount 2
Trackpad Double Click
pressed at 1673293708430 with e.getClickCount 1 and clickCount 1
pressed at 1673293708625 with e.getClickCount 2 and clickCount 2
clicked at 1673293708740 with e.getClickCount 2
Mouse Double Click
pressed at 1673293731535 with e.getClickCount 1 and clickCount 1
pressed at 1673293731707 with e.getClickCount 2 and clickCount 2
clicked at 1673293731807 with e.getClickCount 2
The text was updated successfully, but these errors were encountered: