Bug 470013

Summary: clientAdded emitted too late?
Product: [Plasma] kwin Reporter: Plata <plata.hill>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: xaver.hugl
Priority: NOR    
Version First Reported In: 5.27.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6
Sentry Crash Report:

Description Plata 2023-05-19 17:53:35 UTC
SUMMARY
Changing the window on clientAdded signal happens after the window is fully created.


STEPS TO REPRODUCE
for example
1. Add "Placement=Maximizing" in [Windows] section of kwinrc.
2. Open a window
3. See how it is maximized from the start
5. Set "Placement=Centered"
4. Install Convergent Windows (https://store.kde.org/p/1985909)
5. Open a window

OBSERVED RESULT
The window first opens in the centered position before it is maximized.

EXPECTED RESULT
Same behavior as with the kwinrc setting.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
- Of course, this depends on the device. If it is fast enough, the effect is not visible. I've tested on mobile.
- The intention would be that the settings get applied right from the start, i.e. before the window is drawn initially. However, I'm not even sure if that's technically possible or what kind of side effects it might have.
Comment 1 Zamundaaa 2023-07-26 18:46:00 UTC
this should be fixed with https://invent.kde.org/plasma/kwin/-/commit/712fd3396ca436ac9a58f4e99b56ec6fce9b4330