Bug 449302

Summary: ConfigureNotify event not sent under X11 when moving the window
Product: [Plasma] kwin Reporter: Kettab Ali <alidev2007>
Component: compositingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: yi.gd.cn
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: wechat on wine

Description Kettab Ali 2022-01-28 19:40:40 UTC
SUMMARY

Only the last ConfigureNotify event is sent when the window is moved by the user
if composition is ON. This is not the case for the other WMs or if composition is OFF.

Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.12.9
KDE Frameworks Version: 5.44.0
Qt Version: 5.9.5
Comment 1 Vlad Zahorodnii 2022-02-02 13:58:04 UTC
It's an optimization. Please reopen this bug report if it breaks any app.
Comment 2 Kettab Ali 2022-02-02 16:58:17 UTC
Well, short answer: I need to keep two windows in sync.
that is, when one of them (i.e. the main window, appWindow) moves,
the other window (overlayWindow), which is always on top of the appWindow
should move as well (as if it were part of the appWindow).

This works well under Windows. by processing WM_ENTERSIZEMOVE message.

Under Linux, all the desktop flavors I tested on (GNOME, Xfce, Cinnamon, MATE, Fluxbox,..)
just work as expected too.

I wonder if Kwin could just send this event (ConfigureNotify) at least when the window starts moving
(and this would be acceptable for me) because the last event is always sent and thus, overlayWindow
can be just hidden/shown as needed. 

Regards.
Comment 3 Vlad Zahorodnii 2022-02-03 07:42:16 UTC
I see.. We need to reevaluate whether that optimization is worth keeping it.
Comment 4 Eric Zhang 2022-11-01 03:14:29 UTC
 This change also broke WeChat running under Wine. The WeChat login window has an application-drawn shadow surrounding its login window. When moving the login window, the shadow doesn't follow the login window immediately and only updates its position when moving is done. So the shadow window is detached when moving and suddenly jumps to the new position after moving is finished.
Comment 5 Eric Zhang 2022-11-01 03:22:30 UTC
Created attachment 153368 [details]
wechat on wine