When a PyQt5 application uses move() to set the position of the main window KDE offsets the position. In all my PyQt5 application the QMainWindow pistiion and size are remembered by recording the last values seen in the resizeEvent and moveEvent callbacks. When the application starts up in QMainWindow position and size are restored. self.resize( width, height ) self.move( x, y ) Under KDE I see that the first moveEvent reported is the expected X and Y coordinate but then a second moveEvent pushes the window down by 29 pixles and right by 6 pixels. The QT documentation sugegsts that this is a bug in X11 window manager behaviour, see: http://doc.qt.io/qt-5/application-windows.html#window-geometry Do you agree and can this be fixed. Reproducible: Always Actual Results: Window not placed in the X and Y position of the QMainWindow.move(). It is pushed down and to the right. Expected Results: Allow a new window to placed exactly where the QMainWindow.move( X, Y ) have requested.
"Depends" - you can expect "x,y" to be the final position of *your* window, not the framed window. However, I've no idea what PyQt is doing behind the scenes, can you attach a simple testcase (to inspect what's going on)?
kwin is doing the right thing if I use the right Qt API. For record the right thing to do is use saveGeometry()/restoreGeometry() to have an applications window restored to the position and size the user left it in. The wrong thing to do is use moveEvent() to find position and resizeEvent() to find the size to save. Then use resize() and move() to restrore them. Qt does some "magic" under the covers to have restoreGeometry() do the right thing. Apologies for the false bug report.