Bug 323570 - Remember mixer window size from panel
Summary: Remember mixer window size from panel
Status: ASSIGNED
Alias: None
Product: kmix
Classification: Applications
Component: KMix Panel Docking (other bugs)
Version First Reported In: 4.3
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Christian Esken
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-15 22:22 UTC by Volker Kuhlmann
Modified: 2021-03-10 00:16 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Kuhlmann 2013-08-15 22:22:45 UTC
When the mixer window is opened from the panel icon, the default window size is very narrow, showing two sliders, but only 1 1/2 of the 4 tabs. Making the window wider is fine, but the new size is not stored when the window is closed. When opening from the panel again, the window is back to its unusable narrow width.

When starting kmix from start→Aplications→Multimedia→Sound Mixer, the window size is correctly saved, and also used when kmix is started from the panel.

Reproducible: Always

Steps to Reproduce:
1. Use a fresh unused KDE user login.
2. Start kmix mixer window from panel applet.
3. Resize window.
4. Quit.
5. Start kmix mixer window from panel applet.
Actual Results:  
Last used window size of mixer window is not saved, an ultra-narrow width is restored.

Expected Results:  
Mixer window size is restored to the last-used size.

It appears that window size is correctly restored after kmix is started from the kickoff application launcher once, resized, and quit.
Comment 1 Volker Kuhlmann 2013-08-15 22:41:17 UTC
Window size is not restored if the mixer window is closed with Esc, only if the application is quit with ^Q.

Worse, window size is not saved at all between logout and login. This is annoying.
Comment 2 Volker Kuhlmann 2013-08-16 21:52:33 UTC
And then kmix gets it into its mind to always start with an open mixer window instead being quiet in the panel tray. This is from a saved session, with "restore saved session after login" active.
The only way to recover from this seems to be to delete all kmix-related files from under ~/.kde4/, quitting kmix from running altogether, and saving the login session again.
Comment 3 Christian Esken 2013-08-17 09:11:51 UTC
It sounds like KMix gets killed before it can save the configuration. I once could reproduce it, but not at the moment. I added an explicit "sync" for the config, but it looks this is also not a reliable fix, I am pretty sure that the issue (still) exists. Not sure how to tackle this.

Possible solution:
Save the configuration not only at end, but also when during running (when "dirty"). A simple timer that runs every 10 seconds could check the "dirty" flag and then save all changes. This is like the timer-based autosave feature of apps (Thunderbird, OpenOffice, ...)
Comment 4 Christian Esken 2014-01-05 18:46:55 UTC
If you use "restore saved session after login", then there might indeed be a problem. First the session starts KMix, and then autostart also starts KMix. Any try to run KMix when it is already running will show KMix - this is what most users expect (I start the program => I want to see a window), and thus many applications do that - more or less every one like KMix that is in the System Tray.

There are two solutions:
 1) You disable KMix Autostart in the  KMix config dialog
 2) I continue to try to make "kmix --keepvisibility" working. This was supposed to fix exactly the "session restore + autostart" = show, but I was not yet able to get that option working. It looks like some KDE base library is intercepting, and is showing the KMix window itself.

It is complicated, and if there is somebody proficient with session restore and autostart, I would be very happy to get asssisted here.
Comment 5 Christian Esken 2014-08-11 16:40:47 UTC
Git commit ed6c5bf3825ee7ffc37218acf9b24d77913d2c30 by Christian Esken.
Committed on 11/08/2014 at 16:38.
Pushed by esken into branch 'master'.

Make "--kepvisibilty" working. Also fix a race condition between
session restore and autostart. This might even fix problems after login,
where the window has wrong size or visibility state.

M  +94   -87   apps/KMixApp.cpp
M  +4    -2    apps/KMixApp.h
M  +3    -3    apps/main.cpp

http://commits.kde.org/kmix/ed6c5bf3825ee7ffc37218acf9b24d77913d2c30
Comment 6 Christian Esken 2014-08-12 09:38:07 UTC
Git commit 1757124395e70bbc6f4cdeca0beda086ec7c9827 by Christian Esken.
Committed on 12/08/2014 at 09:35.
Pushed by esken into branch 'master'.

Fix visibilty issues (show/hide) for race conditions between KMix autostart and session restore.
Please see former commit that fixed the "--keepvisibility" switch.

M  +1    -1    kmix_autostart.desktop

http://commits.kde.org/kmix/1757124395e70bbc6f4cdeca0beda086ec7c9827
Comment 7 Justin Zobel 2021-03-10 00:16:16 UTC
Thank you for the bug report.

As this report hasn't seen any changes in 5 years or more, we ask if you can please confirm that the issue still persists.

If this bug is no longer persisting or relevant please change the status to resolved.