Bug 441644 - Stay on top setting for multiple views (windows) doesn't work properly.
Summary: Stay on top setting for multiple views (windows) doesn't work properly.
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Usability (show other bugs)
Version: 4.4.8
Platform: Other Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-28 07:38 UTC by lempikq
Modified: 2021-09-07 15:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lempikq 2021-08-28 07:38:51 UTC
SUMMARY
If you enable subwindows in settings and open a new view or w new window then set this view/window to "stay on top" (right click the window for its settings) the window stays on top only and only if you do not touch it any more otherwise it automatically maximizes. This means if you want to position it on screen with the other view maximized you can't (so you have to guess where it should be on screen so it doesn't get it way), if you accidentally click on it while painting you have to redo the maximize/minimize again, if you want to pan in the second view again you have to minimize it after, and so on, any action will trigger this behaviour.

If you want to set up a second view to see your overall canvas, you have to open the main project, then a new view, in the new view pan canvas and zoom where you need to (don't forget to switch on "set on top"), move the view wherever you want it on screen, then maximize the working window.

Win 10, Krita version: this has been a long going problem for as far as I rememeber with Krita (year, two or so at least).


STEPS TO REPRODUCE
1. open the main project
2. open a new view
3. in the new view pan canvas and zoom where you need to (don't forget to switch on "set on top"), move the view wherever you want it on screen
4. maximize the working window
5. Try to do anyt adjustments to the second view (simply just click on it is enough to maximize it)

OBSERVED RESULT
Clicking or any other action on the second view will maximize the window.

EXPECTED RESULT
The second view/window stays the size you set it (doesn't maximize) where you positioned it and you can do adjustments (such as pan canvas, zoom, ...) as you want while the main view is staying in the background maximized so you can fludily manipulate both.

SOFTWARE/OS VERSIONS
Windows: 10

ADDITIONAL INFORMATION
This happens with both window or a new view - though I assume the problem is exactly the same behind the scene.
Comment 1 Halla Rempt 2021-08-28 07:46:54 UTC
That functionality is provided by Qt's QMdiArea component, so it's not something we actually can fix, I'm afraid.
Comment 2 Wojtek Trybus 2021-08-28 10:24:54 UTC
As a workaround, maybe you'd like my plugin:
https://youtu.be/LwUfLQAgWwA

It adds a lot of logic behind subwindows behaviour - one of the features is assuring the one or two (split screen) subwindows are filling the whole available workspace, while all the other subwindows are floating as "always on top".
Comment 3 lempikq 2021-08-28 14:02:28 UTC
(In reply to Halla Rempt from comment #1)
> That functionality is provided by Qt's QMdiArea component, so it's not
> something we actually can fix, I'm afraid.

I see, that's certainly unfortunate. Is there some way to separate Overview docker from controlling the main view (such as zoom, pan) to utilize it for the same functionality instead, please?

(In reply to Wojciech Trybus from comment #2)
> As a workaround, maybe you'd like my plugin:
> https://youtu.be/LwUfLQAgWwA
> 
> It adds a lot of logic behind subwindows behaviour - one of the features is
> assuring the one or two (split screen) subwindows are filling the whole
> available workspace, while all the other subwindows are floating as "always
> on top".

Oh this is very nice, just out of curiosity, I like to minimize the UI parts if possible, is there an option to keep the main window maximized while having the other subwindow/s on top? :)
Thanks for reminding me of this plugin.
Comment 4 Alvin Wong 2021-08-28 15:35:05 UTC
This flag seems relevant?

https://doc.qt.io/qt-5/qmdiarea.html#AreaOption-enum
Comment 5 Bug Janitor Service 2021-08-28 15:57:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1024
Comment 6 Alvin Wong 2021-09-07 15:09:59 UTC
Git commit c298ef535496f6a5571f567f81217f2834f782fb by Alvin Wong.
Committed on 07/09/2021 at 14:07.
Pushed by alvinwong into branch 'master'.

Set QMdiArea::DontMaximizeSubWindowOnActivation

... so that subwindows that are set to stay on top will not get
maximized when another view is maximized.

M  +1    -0    libs/ui/KisMainWindow.cpp

https://invent.kde.org/graphics/krita/commit/c298ef535496f6a5571f567f81217f2834f782fb
Comment 7 Alvin Wong 2021-09-07 15:15:17 UTC
Git commit 56d4098e09460fec4497623466e51b45d9b71f23 by Alvin Wong.
Committed on 07/09/2021 at 15:13.
Pushed by alvinwong into branch 'krita/5.0'.

Set QMdiArea::DontMaximizeSubWindowOnActivation

... so that subwindows that are set to stay on top will not get
maximized when another view is maximized.
(cherry picked from commit c298ef535496f6a5571f567f81217f2834f782fb)

M  +1    -0    libs/ui/KisMainWindow.cpp

https://invent.kde.org/graphics/krita/commit/56d4098e09460fec4497623466e51b45d9b71f23