Summary: | Intellij IDEA menus and popups are displayed at wrong position after (un)maximizing | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | equeim |
Component: | xwayland | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED DOWNSTREAM | ||
Severity: | normal | CC: | giovanni.santoni72, oguilherme, postix, s.kde, zawertun |
Priority: | NOR | ||
Version: | 6.2.0 | ||
Target Milestone: | --- | ||
Platform: | openSUSE | ||
OS: | Linux | ||
URL: | https://bugs.java.com/bugdatabase/view_bug?bug_id=8338751 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | patch |
Description
equeim
2024-10-09 15:48:11 UTC
I use Wayland session so IDEA runs through XWayland, and its version is "IntelliJ IDEA 2024.2.3 (Community Edition)" It's a bug in JDK, see the attached link. The fix for jdk should be a oneliner. Is there a y workaround that can be applied here? (I suppose I could also try IDEA's experimental Wayland support but that could create more issues than solve). Doesn't this also affect all Java apps, not just IDEA? Yeah, unfortunately, it affects **all** apps that use awt. A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6587 The patch above may help with some things, but JDK needs to re-adjust its code to handle new kwin behavior. In general, awt should not have any WM-specific code to avoid cases exactly like this. Git commit ce2ddeb2249eecc82f5d4d2c7ed331734a295949 by Vlad Zahorodnii. Committed on 10/10/2024 at 08:21. Pushed by vladz into branch 'Plasma/6.2'. Workaround awt breaking due to not handling ConfigureNotify events as expected awt has hardcoded behavior for most of the WMs. In 6.2, internal kwin implementations had changed, which broke awt. See https://bugs.java.com/bugdatabase/view_bug?bug_id=8338751 M +5 -0 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/ce2ddeb2249eecc82f5d4d2c7ed331734a295949 Hi i tried to apply you path and now (In reply to Vlad Zahorodnii from comment #9) > Git commit ce2ddeb2249eecc82f5d4d2c7ed331734a295949 by Vlad Zahorodnii. > Committed on 10/10/2024 at 08:21. > Pushed by vladz into branch 'Plasma/6.2'. > > Workaround awt breaking due to not handling ConfigureNotify events as > expected > > awt has hardcoded behavior for most of the WMs. In 6.2, internal kwin > implementations had changed, which broke awt. > > See https://bugs.java.com/bugdatabase/view_bug?bug_id=8338751 > > M +5 -0 src/x11window.cpp > > https://invent.kde.org/plasma/kwin/-/commit/ > ce2ddeb2249eecc82f5d4d2c7ed331734a295949 I applied the patch from https://invent.kde.org/plasma/kwin/-/commit/ce2ddeb2249eecc82f5d4d2c7ed331734a295949 to KWin 6.2.0. While it partially resolves the issue, the fix only takes effect after I unmaximize and then remaximize the IntelliJ window. If IntelliJ opens directly in a maximized state, the menus remain misaligned. Interestingly, this issue did not occur with version 6.1.5, where everything worked as expected. I would greatly appreciate any advice or suggestions on how to fully resolve this. It's not a full proof solution, it only addresses one of the potential cases. (In reply to Vlad Zahorodnii from comment #12) > see also > https://mail.openjdk.org/pipermail/client-libs-dev/2024-October/023195.html ok thanks for the info! Created attachment 174605 [details]
patch
@Giovanni Santoni if you apply this patch on top, is it better?
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/6588 (In reply to Vlad Zahorodnii from comment #14) > Created attachment 174605 [details] > patch > > @Giovanni Santoni if you apply this patch on top, is it better? Yes! Both patches are now applied, and everything is working, even when the application starts in fullscreen mode. Thanks!(In reply to Vlad Zahorodnii from comment #14) > Created attachment 174605 [details] > patch > > @Giovanni Santoni if you apply this patch on top, is it better? Yes! Both patches are now applied, and everything is working, even when the application starts in fullscreen mode. Thanks! Git commit d7073839c2b9b3bdd6d4a95127853c2accb1e568 by Vlad Zahorodnii. Committed on 10/10/2024 at 13:22. Pushed by vladz into branch 'Plasma/6.2'. Send synthetic configure notify also in manage() Amends ce2ddeb2249eecc82f5d4d2c7ed331734a295949. This is needed to handle the case when the window is initially maximized. M +5 -0 src/x11window.cpp https://invent.kde.org/plasma/kwin/-/commit/d7073839c2b9b3bdd6d4a95127853c2accb1e568 *** Bug 494532 has been marked as a duplicate of this bug. *** *** Bug 494834 has been marked as a duplicate of this bug. *** Downstream fix: https://github.com/openjdk/jdk/pull/21449 I still have a similar issue with Plasma 6.2.2 in a double monitor setup. When IDEA is on the right monitor, and the system is "woken up" after monitors were turned off by timeout (*not* from suspend), menus and popups in IDEA appear on the left monitor (but the main window itself remains on the right one). (In reply to equeim from comment #21) > I still have a similar issue with Plasma 6.2.2 in a double monitor setup. > When IDEA is on the right monitor, and the system is "woken up" after > monitors were turned off by timeout (*not* from suspend), menus and popups > in IDEA appear on the left monitor (but the main window itself remains on > the right one). The fix has been backported to jdk 17. https://github.com/openjdk/jdk17u-dev/pull/2981 |