https://bugs.kde.org/show_bug.cgi?id=496966
Bug ID: 496966 Summary: maximized window state tracking is broken Classification: Plasma Product: kwin Version: 6.2.4 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: X11 Integration Assignee: kwin-bugs-n...@kde.org Reporter: rber...@codeweavers.com Target Milestone: --- SUMMARY KWin loses track of maximized windows if a configure request is sent to a window with the maximized _NET_WM_STATE bits set. This makes it very difficult, if not impossible, for Wine to support maximized windows with KWin. STEPS TO REPRODUCE 1. Create and map a window. 2. Send _NET_WM_STATE change request with _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ atoms added. 3. Send window config request with XReconfigureWMWindow 4. Send _NET_WM_STATE change request with _NET_WM_STATE_MAXIMIZED_VERT and _NET_WM_STATE_MAXIMIZED_HORZ atoms removed. OBSERVED RESULT No _NET_WM_STATE PropertyNotify event is received after 4, window ends up in a broken maximized state. EXPECTED RESULT Application receives a _NET_WM_STATE PropertyNotify with maximized atoms removed, window is restored to its original size (or newly configured sized, up to KWin). SOFTWARE/OS VERSIONS Linux/KDE Plasma: v6.2.4 ADDITIONAL INFORMATION Bogus line is https://invent.kde.org/plasma/kwin/-/blob/v6.2.4/src/x11window.cpp?ref_type=tags#L4065, still present in master. It changes `max_mode` without updating other maximized state information, and doesn't send _NET_WM_STATE updates to the client either. Not that it should, because it would otherwise unmaximize windows as soon as a config request is received, which isn't right either. It probably shouldn't touch max_mode. The reason why this cause a problem later on is because when _NET_WM_STATE is later changed by the client to restore the window, the check at https://invent.kde.org/plasma/kwin/-/blob/v6.2.4/src/x11window.cpp?ref_type=tags#L4518 decides that there's nothing to do. The function returns without changing the _NET_WM_STATE property, and the client never receives an answer to its request. An alternative fix to removing the max_mode update described above, is to call info->setState with the right bits before returning, so that the client receives a notification about the actual KWin internal maximized state. -- You are receiving this mail because: You are watching all bug changes.