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

            Bug ID: 526679
           Summary: Stale size in xdg_toplevel.configure overrides a
                    fixed-size window that resized right after mapping
    Classification: Plasma
           Product: kwin
      Version First 6.7.4
       Reported In:
          Platform: Debian testing
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: wayland-generic
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

When a fixed-size window (min size == max size) changes its size right after it
is mapped, KWin can send an xdg_toplevel.configure with the size of the first
commit afterwards. Qt applies it, so the window ends up at the old size while
its contents expect the new one.

This happens with the Albert launcher: the window is shown with only the input
line (height 229), the results arrive a few ms later and the window sets a new
fixed size (521). Shortly after, KWin sends configure(1034, 229) together with
the activation. The window stays squeezed until it is hidden again.

It is a timing issue. On AC power KWin replies within a few ms and the order is
harmless. On battery with the power-saver profile the reply takes up to ~300 ms
and it is reproducible every few tries.

STEPS TO REPRODUCE
1. Use a client with a fixed-size toplevel that sets a new min/max size and
commits a buffer of that size shortly after the first commit, before the
activation configure arrives (e.g. Albert with text left in the input, so
results show up immediately on show).
2. Switch to battery / power-saver profile to slow down the compositor reply.
3. Show the window repeatedly.

OBSERVED RESULT
WAYLAND_DEBUG=1 excerpt:

  .914  -> xdg_toplevel.set_min_size(1034, 229) / set_max_size(1034, 229)  
window shown
  .918  <- xdg_toplevel.configure(0, 0, [])
  .927  -> xdg_toplevel.set_min_size(1034, 521) / set_max_size(1034, 521)   new
size committed
  .963  <- xdg_toplevel.configure(1034, 229, [activated])                  
stale size

EXPECTED RESULT
No configure with a size that is outdated and outside the current min/max size.
For a floating window that cannot be resized either 0x0 or the current size.

SOFTWARE/OS VERSIONS
Linux: Debian forky/sid, kernel 7.1.3
KDE Plasma: 6.7.4
KDE Frameworks: 6.30.0
Qt: 6.11.2
Graphics platform: Wayland

ADDITIONAL INFORMATION
Qt not clamping the configured size to min/max is a separate issue, reported to
Qt as well. Downstream workaround:
https://github.com/albertlauncher/albert-plugin-widgetsboxmodel/pull/16

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

Reply via email to