Bug 474627

Summary: Changing window height and width at once via script on wayland does not work
Product: [Plasma] kwin Reporter: Petr Bartos <bartos.petr>
Component: scriptingAssignee: KWin default assignee <kwin-bugs-null>
Status: CONFIRMED ---    
Severity: normal CC: nate
Priority: NOR    
Version First Reported In: git-stable-Plasma/5.27   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Petr Bartos 2023-09-17 17:54:13 UTC
Hi,
i am trying to write script (using javascript) which changes size of some windows. When script is executed, only one dimension of window can be changed at once. So when doing this:

client.frameGeometry.width = 500;
client.frameGeometry.height = 500;

only window height is changed. When these lines are swapped, only width is changed. This works without problem on X11. However I've found workaround which works on both:

client.frameGeometry.width = 500;
client.geometryChanged.connect(() => {
  client.frameGeometry.height = 500;
});