Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8338752

Wrong mouse position in popup menus when running in KDE Plasma 6.2-dev

XMLWordPrintable

    • x86_64
    • linux

      ADDITIONAL SYSTEM INFORMATION :
      OS: Arch Linux
      Desktop Environment: KDE Plasma 6.2 (dev build, not yet released)
      JRE: 22.0.2.u9

      A DESCRIPTION OF THE PROBLEM :
      In the upcoming KDE Plasma 6.2 release, the window manager `kwin` has a change in when `ConfigureNotify` is sent:
      https://invent.kde.org/plasma/kwin/-/commit/7b486e215d44bbd9fdeb8f1180c76fb16ec6a311

      The above change conforms to ICCCM, but it breaks Java apps using Swing: after maximizing the app window, in popup menus, the app considers the mouse cursor to be at a different position than it visually is, as if the app window is in the position before maximizing.

      We suspect this is caused by AWT special-casing `ConfigureNotify` behavior on a WM whitelist:
      https://github.com/openjdk/jdk/blob/88ccbb60919e4523064b0da17184eedcd9efa087/src/java.desktop/unix/classes/sun/awt/X11/XWindowPeer.java#L772
      And `kwin` is not in the list. Making `kwin` disguise as `mutter` fixes the problem, which confirms the theory.

      So can you remove the whitelist and make it "the default for every case" as in comments in the above code, or add `kwin` to the list?

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Start KDE Plasma 6.2-dev.
      2. Start the Java app `jdownloader2`, unmaximized.
      3. Move the app window to the screen center.
      4. Maximize the app window.
      5. Right click to show the popup menu.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Mouse works alright in the menu.
      ACTUAL -
      Mouse is considered to be to the top-left of its actual position.

      FREQUENCY : always


            azvegint Alexander Zvegintsev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: