https://bugs.kde.org/show_bug.cgi?id=489983

            Bug ID: 489983
           Summary: Incorrect window size when restoring from a maximized
                    state
    Classification: Plasma
           Product: kwin
           Version: 6.1.1
          Platform: Fedora RPMs
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: kwin-bugs-n...@kde.org
          Reporter: frank.praz...@gmail.com
  Target Milestone: ---

Created attachment 171504
  --> https://bugs.kde.org/attachment.cgi?id=171504&action=edit
WAYLAND_DEBUG=1 output

Upstream SDL bug: https://github.com/libsdl-org/SDL/issues/10203

Windows will shrink in size by few pixels after being maximized and restored.
In some cases this can allow the window to have zero area, causing a crash.

STEPS TO REPRODUCE
1. Build the main branch of SDL3 with the tests enabled (cmake -DSDL_TESTS=on)
2. Run testsprite with the --resizable flag
3. Click the maximize button in the title bar, followed by the restore button

OBSERVED RESULT

The 640x480 window becomes 637x478

EXPECTED RESULT

The 640x480 window remains 640x480

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Fedora 40 with KDE 6.1.1

ADDITIONAL INFORMATION

The WAYLAND_DEBUG=1 output shows the following when restoring from maximized:

1. KWin sends a configure event for the floating window with a size of 643x482
(???)
2. The SDL application ignores the size hint in this case, because it knows
that the floating window size should be 640x480
3. The window is configured to be 640x480 and a buffer of that size is attached
4. KWin then sends a 'corrected' configure event with current dimensions offset
by -3,-2, in what appears to be an attempt to fix the previously requested
(incorrect) window size, but that ends up making the window 637x478, since the
geometry was already corrected by SDL.

The window size sent in the configure event for floating windows is just a
hint, so I don't think that SDL is in the wrong here by ignoring it in favor of
what it knows to be correct, which it has historically had to do since some
older compositors would send incorrectly resize the window when transitioning
from non-floating to floating states.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to