Sergei Tachenov fde6354816 JBR-7586 Fix title click ungrab when an active user component is clicked
Swing requires that clicking frame decorations should cause the window
to be ungrabbed. However, if a custom title is used, and that title contains
user-provided components, then clicking such components should not
cause the window to be ungrabbed, otherwise a menu located in a custom
title behaves incorrectly.

Fix by using the same logic as for the native actions, such as moving the window.
If the native actions are allowed, then ungrabbing is allowed as well.
Otherwise, do not ungrab, let the component behave like it's located in the client area.

The fix is supplemented with a new regression test "test/jdk/jb/javax/swing/CustomTitleBar/JMenuClickToCloseTest.java".

(cherry picked from commit f82c018914)
2025-03-28 01:03:42 +01:00
2025-03-28 01:03:42 +01:00
2025-03-28 01:03:35 +01:00
2025-03-28 01:03:29 +01:00
2025-03-28 01:02:19 +01:00
2016-05-30 16:17:11 +02:00
2025-03-28 01:02:33 +01:00
2024-09-25 16:25:23 +00:00

official JetBrains project

Welcome to the JDK!

For build instructions please see the online documentation, or either of these files:

See https://openjdk.org/ for more information about the OpenJDK Community and the JDK and see https://bugs.openjdk.org for JDK issue tracking.

Description
Runtime environment based on OpenJDK for running IntelliJ Platform-based products on Windows, macOS, and Linux
Readme GPL-2.0 1.3 GiB
Languages
Java 73.7%
C++ 14%
C 8.1%
Assembly 2.7%
Objective-C 0.5%
Other 0.8%