bpozdena / OneDriveGUI

A simple GUI for OneDrive Linux client with multi-account support.
GNU General Public License v3.0
756 stars 34 forks source link

won't minimise to tray if program runs before dock initialises #180

Closed TheAwesome98-Real closed 2 months ago

TheAwesome98-Real commented 2 months ago

Describe the bug if onedrivegui opens before the tray initialises, it won't minimise to it

To Reproduce Steps to reproduce the behavior:

Expected behavior i expected it to minimise to the tray

Screenshots If applicable, add screenshots to help explain your problem.

Log If applicable, add relevant output from log file /tmp/onedrive-gui/onedrive-gui.log.

System Info

OneDriveGUI info How did you install OneDriveGUI?: [AppImage/source/AUR] nixpkgs What is the name of the AppImage file (if applicable)? : [e.g OneDriveGUI-1.x.x-x86_64.AppImage]

Additional context Add any other context about the problem here.

bpozdena commented 2 months ago

Hi @TheAwesome98-Real ,

my understanding is that OneDriveGUI starts before your system tray is be initialized after boot. If that is correct, then OneDriveGUI behaves as expected.

The problem is that if the tray is not available and the OneDriveGUI minimizes "to it", you will never be able to open the window again.

If your system tray starts working with a delay for some reason, perhaps you could simply delay the start of OneDriveGUI by a few seconds?

Alternatively, you might need to tweak MATE settings to ensure StatusNotifierItem is working as expected. I don't know anything about MATE, but it looks like the system tray functionality can be achieved with Ayatana Indicators .

TheAwesome98-Real commented 2 months ago

i could delay onedrivegui's startup, but i was wondering if you could make a setting for delaying connecting to the tray? i don't know how the tray in x11 works, so i don't know if this is possible.

bpozdena commented 2 months ago

There is no way to implement it without periodically checking if the tray become available. The end result would be weird as the GUI would first minimize into dock and then suddenly disappear from there.

I'd suggest delaying the OnedriveGUI start, or fixing your desktop environment and ensuring the tray applet loads before other apps.

I'll close this as not planned.