digiKam 7.9 version not remember the last size of digiKam window. I tested in Linux Mint 20.x, but this works well there, in the digiKam 7.8 worked well too. 1) Open digiKam in Windows 10 2) Click full screen button on the digiKam window titlebar 3) Close digiKam 4) Open again the digiKam Result: Window of digiKam again small size, digiKam not remember to the full screen size of the window I try deleted digikamrc file and create again, but not helped me.
Yes, I can reproduce. Since we haven't made any changes here, I suspect the update to a newer KF5 version made things worse. Maik
Hi Maik, Look here : https://kde.org/announcements/frameworks/5/5.99.0/ Section KXMLGUI : "use same config for position restoration as for position saving" Gilles
Hmm, I see that there is a new feature for saving via QScreen. But I also see that we probably need to implement save/restoreWindowPosition() in addition to save/restoreWindowSize(). Maik
*** Bug 461954 has been marked as a duplicate of this bug. ***
The problem is in a used KF5 library. It has also been reported for Linux with Wyland. Maik
*** Bug 462068 has been marked as a duplicate of this bug. ***
Hi Maik, In KF5 5.100, i do not seen change in KXmlGui framework about this problem: https://invent.kde.org/frameworks/kxmlgui/-/commits/master There is also nothing to read in framework announcement : https://kde.org/announcements/frameworks/5/5.100.0/ I can upgrade KF5 to release 100 (actually 99), but i doubt that something will be fixed... Gilles Note : i can reproduce the problem under Windows 10, but not under Linux and MacOS.
I think this recent bug report is related to this: Bug 461405 Maik
Maik, This is the commit change in KXMLGUI about to restore the window position on screen between application instances: https://invent.kde.org/frameworks/kxmlgui/-/commit/72919b5ef9168a5419b80fb26b7241fc507cd63a#78c679f7f0f0a8423d30a5f6eb63a53f4fc17ccc So the current code located at this place : https://invent.kde.org/frameworks/kxmlgui/-/blob/master/src/kmainwindow.cpp#L745 Who turn on "AllowKDEAppsToRememberWindowPositions" value on the config file exactly ? Gilles
The entry in bugzilla relevant of this code in KXMLGUI : https://bugs.kde.org/show_bug.cgi?id=426725 Gilles
Maik, Another entry interesting to read : https://bugs.kde.org/show_bug.cgi?id=415150 Gilles
I see that not only the screen size is encoded in the size parameter, but also the screen itself. I think since the problem only occurs on Wyland and Windows and probably not on X11 that it is related to that. Here's a history, it seems to have been changed several times, my monitor is always connected via display port, the port names vary. DP-1 HDMI-A-1 Height 1200=894 DP-1 HDMI-A-1 Width 1920=1920 DP-1 Height 1200=894 DP-1 Height 1920x1200=894 DP-1 Width 1920=1920 DP-1 Width 1920x1200=1912 DP-1 XPosition 1920x1200=4 DP-1 YPosition 1920x1200=147 DisplayPort-0=DisplayPort-0 DisplayPort-0 HDMI-0 Height 1200=894 DisplayPort-0 HDMI-0 Width 1920=1920 DisplayPort-0 HDMI-0 XPosition=0 DisplayPort-0 HDMI-0 YPosition=31 Maik
The current values written in KF5.100 look like this: DisplayPort-0=DisplayPort-0 DisplayPort-0 Height 1920x1200 DisplayPort-0=1021 DisplayPort-0 Width 1920x1200 DisplayPort-0=1912 DisplayPort-0 XPosition 1920x1200 DisplayPort-0=4 DisplayPort-0 YPosition 1920x1200 DisplayPort-0=32 Maik
A test with a Waland Plasma session shows that the values from X11 are not adopted. The size is then saved correctly, but not the position. It also shows the applied values that no position is saved under Wayland. DP-1 Height 1920x1200 DP-1=931 DP-1 Width 1920x1200 DP-1=1511 DP-1 Window-Maximized 1920x1200 DP-1=true Maik
*** This bug has been marked as a duplicate of bug 460260 ***
> A test with a Wayland Plasma session shows that the values from X11 are not adopted That's a separate issue, basically Bug 385135.
These are the entries from a Windows 10 (VM) digiKamrc. The screen is missing at the beginning and the config starts with a "\". This is also output with many error messages in the log. It is clear that the window size cannot be found. We have 2 options, either we look for the problem in the KF5 library or we implement it ourselves as a workaround. \sHeight 1600x1200=829 \sWidth 1600x1200=1238 \sXPosition 1600x1200=174 \sYPosition 1600x1200=168 Maik
This problem is a recurrent issue since many years. It's clear for me there is a lack of Windows support somewhere. I vote for a simple solution based on QSettings file for ex, which work well under Windows (i use it at work since a very long time). Gilles
Git commit 329e06c8f0f804810adf8ef65ae873bf3f8e435d by Maik Qualmann. Committed on 29/11/2022 at 20:50. Pushed by mqualmann into branch 'master'. save and restore window Size on Windows for testing M +2 -0 core/app/main/digikamapp.cpp M +67 -0 core/libs/widgets/mainview/dxmlguiwindow.cpp M +3 -0 core/libs/widgets/mainview/dxmlguiwindow.h M +2 -0 core/utilities/imageeditor/main/imagewindow.cpp M +2 -0 core/utilities/import/main/importui.cpp M +2 -0 core/utilities/lighttable/lighttablewindow.cpp M +2 -0 core/utilities/queuemanager/main/queuemgrwindow.cpp https://invent.kde.org/graphics/digikam/commit/329e06c8f0f804810adf8ef65ae873bf3f8e435d
@Gilles, can you create a Windows digiKam-8.0.0 bundle to test? If it works, we can apply the patch to digiKam-7.9.0. Some checks to see if the window size still fits may need to be added. I only plan on keeping this code until it is fixed in KF5. Maik
yes 8.0.0 installer will be online tomorrow morning. Gilles
Windows 8.0.0 installer have been just updated online : https://files.kde.org/digikam/unstable/ Gilles
Maik, I tested last 8.0.0 pre-release under Windows 7, and window sizes and positions are now properly restored as i can see... Gilles
(In reply to caulier.gilles from comment #23) > Maik, > I tested last 8.0.0 pre-release under Windows 7, and window sizes and > positions are now properly restored as i can see... > Gilles Hi Maik and Gilles, I tested last 8.0.0 pre-release under Windows 10. It seems to work fine, but it doesn't... ...digiKam adjusts the set size only after every second start, but even then the program window is only apparently full screen. It's actually full screen, but a resizable window.
It is clear that it does not work the first time you start it, but then it always works here under Windows10. Yes, the window is only resized to its previous size, currently it is not stored in the config that it is maximized. As said, this is only a workaround until the problem is fixed in the KF5 Library. Maik
yes i agree with Maik. the goal is to restore size and position between sessions, the first one is a special case. Gilles
Git commit dfacb22f8819c5ac3150201aef2a2a833ddf396a by Maik Qualmann. Committed on 30/11/2022 at 18:05. Pushed by mqualmann into branch 'master'. restore maximized state and check geometry M +20 -6 core/libs/widgets/mainview/dxmlguiwindow.cpp https://invent.kde.org/graphics/digikam/commit/dfacb22f8819c5ac3150201aef2a2a833ddf396a
Maik and Giles. Thank you for your work Regards Peter
@Gilles, another digiKam-8.0.0 test version would be good before we merge the patch to digiKam-7.9.0. Maik
Done. Windows installers 8.0.0 are updated online at usual place... Gilles
For a single screen it works fine. In a multiscreen setup, it doesn't work on the 2nd screen. I guess we are too fast and have to do it after the show event. Maik
Created attachment 154197 [details] 7zip archive of BaseDlg class sample Hi Maik, Class BaseDlg based on QDialog used in my office on multi-screen Windows computer, with code to restore and sample dialog size and position. It's use QDialog::showEvent(). Gilles
>code to restore and sample dialog size and position ==> code to restore and save dialog size and position
Git commit 6415d9aef7477471e8b814ff03c9c07c7906ec31 by Maik Qualmann. Committed on 01/12/2022 at 19:13. Pushed by mqualmann into branch 'master'. improved support for multiple monitors M +0 -2 core/app/main/digikamapp.cpp M +35 -22 core/libs/widgets/mainview/dxmlguiwindow.cpp M +5 -0 core/libs/widgets/mainview/dxmlguiwindow.h M +0 -2 core/utilities/imageeditor/main/imagewindow.cpp M +0 -2 core/utilities/lighttable/lighttablewindow.cpp M +0 -2 core/utilities/queuemanager/main/queuemgrwindow.cpp https://invent.kde.org/graphics/digikam/commit/6415d9aef7477471e8b814ff03c9c07c7906ec31
Maik, New version of Windows installer 8.0.0 is online. Gilles
Thanks Gilles, it seems to be working fine as a workaround so far. digiKam will reopen to the last used screen, with the same position and size or maximized. I will apply the patch to digiKam-7.9.0 tonight. Maik
Great. Well, i can plan the 7.9.0 tag on git while this week end. Gilles
Git commit c111184751010a0cbae92ae4fa3aecfa4b780e01 by Maik Qualmann. Committed on 02/12/2022 at 17:39. Pushed by mqualmann into branch 'qt5-maintenance'. backport from master workaround to fix window size and position on Windows M +94 -0 core/libs/widgets/mainview/dxmlguiwindow.cpp M +8 -0 core/libs/widgets/mainview/dxmlguiwindow.h https://invent.kde.org/graphics/digikam/commit/c111184751010a0cbae92ae4fa3aecfa4b780e01
I noticed this behavior happens with the image editor window as well in digiKam 8.0 beta.
Hi Tom, And not in 7.9.0 just released ? Unix Linux, Mac or Windows ? Gilles
The problem is also fixed under digiKam-8.0.0. But not for the first start, first for the further ones. Maik
Fixed with bug 460260