Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Window State Not Persisted After Restart: Fails to Remember Full-Screen and Window Sizes #418

Open
oh2gba opened this issue Jul 20, 2024 · 9 comments
Labels
bug Something isn't working

Comments

@oh2gba
Copy link

oh2gba commented Jul 20, 2024

This is my screen before closing:
Screenshot_1

Close Qlog and reopen it again, the size of the main window is smaller now, and I have to maximize it
Screenshot_2

After maximizing, the window sizes are not the same anymore, see dx-cluster and online-map are smaller now.
Screenshot_3

It would be so nice if Qlog would just remember all sizes! Perhaps not a bug, but a kind request :)

John

@dimarmnes
Copy link

dimarmnes commented Jul 20, 2024 via email

@foldynl
Copy link
Owner

foldynl commented Jul 20, 2024

I know about the issue but I don't know how to fix it. It occurs only in case when the full screen layout is saved.

@foldynl foldynl added the bug Something isn't working label Jul 20, 2024
@dl2ki
Copy link

dl2ki commented Jul 22, 2024

Suggestion:

If a solution can be found here, perhaps the position and zoom factor of the band map could be saved at the same time, so that they are restored when QLog is restarted.

On the other hand, there may be reasons why other settings or no settings at all for displaying the bandmap when starting QLog may make more sense.

foldynl added a commit that referenced this issue Jul 23, 2024
QApplication::desktop is obsoleted and QT6.x does not implement it.
This commit uses QGuiApplication::screens
foldynl added a commit that referenced this issue Jul 23, 2024
Need to apply only for QT under 6.3. Otherwise, other QT issue is present.
foldynl added a commit that referenced this issue Jul 26, 2024
If it was like this, then the QT error occurred because no windows frame
was present when switching to the same profile.
@dl2ki
Copy link

dl2ki commented Jan 22, 2025

System: Kubuntu 24.04.01 / QLog 0.41.1

I have noticed that the dimensions of the individual windows have changed after restarting QLog. The settings for the window widths and heights are apparently not saved.

This issue indicates that this is only the case in QLog fullscreen mode. I don't use QLog in fullscreen mode because I still need access to some desktop elements on the side of the QLog window.

I have therefore reduced the window size once, to show a maximum effect, and then closed QLog.

Here are two pictures. Both layers have been adjusted to 1908 x 1064 px for comparison.

555 x 869 px
Image

After restarting you can see that the window sizes are not the same as before.

1908 x 1064 px
Image

If I close QLog in the size used here, the overall size of the QLog desktop does not change when I restart it. Only the individual settings of some window widths and heights change.

@aa5sh
Copy link

aa5sh commented Jan 22, 2025

One thing to try would be to click on the activities option in the bottom and save it to see if it makes a difference.

Image

@dl2ki
Copy link

dl2ki commented Jan 22, 2025

OK, thanks for the hint.

In ‘Classic’ mode, restoring the set window sizes works. However, the display of ‘TX PWR’ is missing here.

In ‘Activity’ mode (here: dl2ki), ‘Save Arrangement’ must always be pressed after setting the window sizes.

When restarting, however, other window sizes continue to appear. However, the previously set window sizes appear when I switch the activity from ‘dl2ki’ to ‘classic’ and then back to ‘dl2ki’.

@dl2ki
Copy link

dl2ki commented Jan 24, 2025

Hi,

I have experimented a little here. The behaviour with the required double switching of the activity can certainly be reproduced here. Is this also the case for you, or could there be a cause outside of QLog?

@foldynl
Copy link
Owner

foldynl commented Jan 24, 2025

Wolfgang, to be honest, I do not really understand your issue. Is the problem that the window size changes between restarts?

I tried both full-screen and non-full-screen modes, and if the settings are saved, everything returns to the default size after both restarts and profile switches. Even when switching back to the same profile, everything is set to the correct size. Overall, the issue is that there is a bug in Qt, and QLog implements some workarounds to compensate for it. Maybe there is the issue.

The important thing is to press Save Arrangement when you are satisfied with the window layout. I will try to run some additional tests over the weekend.

@dl2ki
Copy link

dl2ki commented Jan 24, 2025

Hi Ladislav,

I have sent you a demo video by e-mail. Perhaps the behavior of QLog is now a little clearer.

@foldynl foldynl reopened this Jan 26, 2025
@foldynl foldynl moved this to In Progress in v0.42.0 Roadmap Jan 26, 2025
foldynl added a commit that referenced this issue Jan 28, 2025
It seems that the workaround for QTBUG-46620 must be present also for QT 6.8
foldynl added a commit that referenced this issue Jan 28, 2025
Qt has an issue when performing saveGeometry in the case of a maximized window.
There are many workarounds, but none of them fully resolve the problem.
Therefore, this hack is used. If QLog detects a maximized window, it "changes" it as "normal" and
then resizes it to its original size. The user should not notice any difference in terms of size, but saveGeometry
works more reliably in this "normal" window mode.
foldynl added a commit that referenced this issue Jan 28, 2025
Enable the fix only for Linux - Windows OS does not need this.
@foldynl foldynl moved this from In Progress to Done - branch: testing_0.42 in v0.42.0 Roadmap Feb 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done - branch: testing_0.42
Development

No branches or pull requests

5 participants