Bug 423097 - Manage Resources dialog is not parented correctly (half of the time)
Summary: Manage Resources dialog is not parented correctly (half of the time)
Status: RESOLVED MOVED
Alias: None
Product: krita
Classification: Applications
Component: Resource Management (show other bugs)
Version: 4.2.9
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Halla Rempt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-17 11:21 UTC by Fonkle
Modified: 2020-06-20 11:33 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fonkle 2020-06-17 11:21:33 UTC
SUMMARY
In Krita 4.2.0 and up, the 'Manage Resources' dialog is not a child window of the Krita interface half of the time, and opens at the top left corner (0,0) of the X displays. This results in the dialog being off-screen if the left display is not positioned at (0,0).

This bug is not present in Krita 

STEPS TO REPRODUCE
1. Start Krita
2. Open 'Settings->Manage Resources' (multiple times if needed).

OBSERVED RESULT
Dialog is sometimes a child of the Krita UI, and sometimes it is not. In that case it is displayed at X coordinates (0,0).

EXPECTED RESULT
Dialog should always be a child of the Krita UI, therefore opening in the center of the Krita UI (or centered).

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
Tested with Nvidia Proprietary driver on Krita versions (AppImage):
4.1.7
4.2.0
4.2.7.1b
4.2.8
4.2.9
4.3.0 beta 1
4.3.0 beta 2

The bug is present in Krita versions 4.2.0 and up; 4.1.7 is NOT affected.
Comment 1 Halla Rempt 2020-06-17 12:39:53 UTC
Git commit 09cd150ba44bd8d81eb4a499349730b682b38524 by Boudewijn Rempt.
Committed on 17/06/2020 at 12:39.
Pushed by rempt into branch 'krita/4.3'.

Parent the resource manager window

M  +6    -3    plugins/extensions/resourcemanager/resourcemanager.cpp

https://invent.kde.org/graphics/krita/commit/09cd150ba44bd8d81eb4a499349730b682b38524
Comment 2 Fonkle 2020-06-17 13:10:46 UTC
The fix for this bug: https://bugs.kde.org/show_bug.cgi?id=423097 sadly does not fix the problem completely. Although the dialog is now correctly parented to the current MainWindow, the dialog still does not always position correctly.

I have added a merge request with a fix which explicitly moves the dialog to the center of the supplied parent QRect: https://invent.kde.org/graphics/krita/-/merge_requests/381

Would you be so kind as to review it? Thanks!
Comment 3 Fonkle 2020-06-17 13:15:08 UTC
Oops: the previous merge request was against the wrong branch. I have updated the request: https://invent.kde.org/graphics/krita/-/merge_requests/382.

Sorry for the inconvenience :).
Comment 4 Fonkle 2020-06-17 21:09:37 UTC
This bug manifests itself on any KDE Plasma system I have tested with both X and Wayland with Intel and NVidia graphics.

Only Krita's 'Manage Resources' dialog shows this behavior; other dialogs work fine.

In the following video by David Revoy on Youtube this bug manifests itself at 0:21 when he opens the 'Manage Resources' dialog: the window opens at the topleft of the screen instead of centered on the parent window, like all other Krita dialogs do:

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

On my system this is extra annoying since the top of the dialog (including the title bar) are cut off since the left monitor starts below (0,0).

Since Krita up to version 4.1.7 as well as all other (Krita) dialogs seem to work fine, I think this bug is in Krita and not in the Window Manager.
Comment 5 Fonkle 2020-06-18 11:06:17 UTC
Link to a video on Youtube showing the dialog jumping off-screen half of the time. The 'Configure Krita' dialog does not:

https://youtu.be/qIErkJPqC5k
Comment 6 Fonkle 2020-06-20 11:33:15 UTC
Closing this since I have filed it with kwin:

https://bugs.kde.org/show_bug.cgi?id=423158