Bug 423158 - Window positioning unstable
Summary: Window positioning unstable
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.18.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-18 14:03 UTC by Fonkle
Modified: 2023-01-25 20:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
xprop output for the Krita Manage Resources dialog: wrong placement (25.87 KB, text/plain)
2020-06-18 20:27 UTC, Fonkle
Details
xprop output for the Krita Manage Resources dialog: ok placement (25.87 KB, text/plain)
2020-06-18 20:28 UTC, Fonkle
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fonkle 2020-06-18 14:03:30 UTC
SUMMARY

When used on KDE Plasma, the window position of the 'Manage Resources' dialog in Krita is wrong about half of the times it is opened. I have uploaded a video to Youtube illustrating the misplaced dialog:

https://www.youtube.com/watch?v=qIErkJPqC5k


STEPS TO REPRODUCE
1. Open Krita
2. Go to Settings -> Manage Resources
3. Repeat a few times if needed

OBSERVED RESULT

The dialog is sometimes (seemingly random) positioned correctly and sometimes eeroneously near the top left of the screen.

EXPECTED RESULT
The dialog is always positioned correctly.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Positioning inside both QWidget::exec() and QWidget::open() both seem to be affected.
Comment 1 David Edmundson 2020-06-18 15:17:38 UTC
But still within the screen correctly? Sort of the same behaviour if you were to open a new app?


>Positioning inside both QWidget::exec() and QWidget::open() both seem to be affected.

That's spoken like a dev, is the transient parent set?

Before I recompile all of krita, can I have the output of xprop and clicking on the newly popped out window.
Comment 2 Fonkle 2020-06-18 20:27:54 UTC
Created attachment 129498 [details]
xprop output for the Krita Manage Resources dialog: wrong placement
Comment 3 Fonkle 2020-06-18 20:28:17 UTC
Created attachment 129499 [details]
xprop output for the Krita Manage Resources dialog: ok placement
Comment 4 Fonkle 2020-06-18 20:36:13 UTC
I have attached the output for both a good and bad positioned Manage Resources dialog in Krita. The only property that is different is the 'user specified location'.

I have filed this bug with Krita before (https://bugs.kde.org/show_bug.cgi?id=423097) and suggested its devs to fix it by explicitly specifying the position when exec-ing the dialog. That however turned out to be not-done in Krita, since it leaves positioning to the window manager.

Strangely, the other dialogs in Krita work as intended.
Comment 5 Fonkle 2020-06-18 20:41:48 UTC
Setting the parent of the dialog to the current MainWindow was committed in the krita/4.3 branch on 2020-06-07:

https://invent.kde.org/graphics/krita/-/commit/09cd150ba44bd8d81eb4a499349730b682b38524)

But that didn't fix the issue.
Comment 6 Vlad Zahorodnii 2023-01-25 13:31:50 UTC
Can't reproduce it with krita 4.4.4. If the issue is still present for you, please report it to krita developers.

krita should not place the dialog itself. It should just set the transient parent information and let the window manager place the dialog.
Comment 7 Fonkle 2023-01-25 20:25:25 UTC
Bug seems to have been resolved (for a while?). Resolved in <= 5.1.5. Great!