Bug 441935

Summary: When brush editor is moved to secondary monitor, closedm and opened again, it returns to default position.
Product: [Applications] krita Reporter: rebuilderster
Component: DockersAssignee: Alvin Wong <alvin>
Status: RESOLVED FIXED    
Severity: normal CC: alvin
Priority: NOR    
Version: 5.0.0-beta1   
Target Milestone: ---   
Platform: Mint (Ubuntu based)   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description rebuilderster 2021-09-03 06:43:49 UTC
SUMMARY
The new floating brush editor can be placed on a secondary monitor.
 This is nice, but it does not remember its position.
STEPS TO REPRODUCE
1. press F5 to open brush editor
2. drag the floating editor window to a different monitor.
3. Press F5 to close it again after switching focus to the main Krita window.
4. Press F5 to reopen the brush editor

OBSERVED RESULT
The brush editor opens in the original location on the primary screen.


EXPECTED RESULT
The brush editor should open where the user last placed it, on the secondary screen.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Bug Janitor Service 2021-09-04 13:40:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1032
Comment 2 Dmitry Kazakov 2021-09-05 10:37:42 UTC
Git commit f9476b105f37702b73e24ae7d2026b3c7ea8b127 by Dmitry Kazakov, on behalf of Alvin Wong.
Committed on 05/09/2021 at 10:37.
Pushed by dkazakov into branch 'master'.

Use QScreen from QWindow to handle KisPopupButton positioning

This fixes two issues:

- Explicitly setting screen before showing to ensure the correct
  devicePixelRatio scaling.
- For detached brush editor, use the screen it was previously moved to
  instead of forcing it to be shown on the same screen the main window
  is displayed.

M  +27   -4    libs/widgetutils/KisPopupButton.cpp

https://invent.kde.org/graphics/krita/commit/f9476b105f37702b73e24ae7d2026b3c7ea8b127
Comment 3 Alvin Wong 2021-09-05 11:10:45 UTC
Git commit 8364b656d3b1c8be50afa2830d121f823473cea5 by Alvin Wong.
Committed on 05/09/2021 at 11:10.
Pushed by alvinwong into branch 'krita/5.0'.

Use QScreen from QWindow to handle KisPopupButton positioning

This fixes two issues:

- Explicitly setting screen before showing to ensure the correct
  devicePixelRatio scaling.
- For detached brush editor, use the screen it was previously moved to
  instead of forcing it to be shown on the same screen the main window
  is displayed.


(cherry picked from commit f9476b105f37702b73e24ae7d2026b3c7ea8b127)

M  +27   -4    libs/widgetutils/KisPopupButton.cpp

https://invent.kde.org/graphics/krita/commit/8364b656d3b1c8be50afa2830d121f823473cea5