When I call workspace.clientArea() in my screenResized handling, it always returns the area it used to be, i.e. when I change resolution from 1366x768 to 1024x768, it will have a width of 1366. After the signal is handled it will be the correct size. This means I'm currently unable to autoadjust to resolution changes in my tiling script. This is somewhat related to https://bugs.kde.org/show_bug.cgi?id=326233, as that would be a superset of the current screenResized signal. Reproducible: Always Steps to Reproduce: Run the following: workspace.screenResized.connect(function(screen) { print("SCREEN RESIZED"); var screenRect = workspace.clientArea(KWin.PlacementArea, screen, workspace.currentDesktop); print(screenRect.x, screenRect.y, screenRect.width, screenRect.height); }); change resolution and check the output. Actual Results: Output is something like: SCREEN RESIZED 0 0 1366 768 Expected Results: SCREEN RESIZED 0 0 1024 768 The workaround currently is to require the user to do something (e.g. open, close or move a window).
Ran into that, used a timer: http://kde-look.org/content/show.php?content=162304 The problem is that kwin has an internal delay before acting (maaaany screen resizes can happen on a single change - depending on how stupid the change is caused), but the signal is directly bound to QDesktopWidget::resized(int) I suggest to act later in scripts as well, either the way done by the linked script or by adding a signal hopper in the wrapper. The latter would prevent scripts to really react on every single resize action (no idea whether that's required - just mentioning)
After some googling, I've found that either there is a Qt bug (QTimer isn't accesible from my code), or I need to refactor my code into one file so I can drop qml (which I only need for Qt.include). Either way, I can't see any use for the current behavior regarding screenResized, so it should be changed.
Thank you for the bug report. As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists. If this bug is no longer persisting or relevant please change the status to resolved.