-
Notifications
You must be signed in to change notification settings - Fork 160
If there's no system tray, at least show a window. #2205
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
base: master
Are you sure you want to change the base?
Conversation
* src/vorta/application.py: Check whether system tray is available. Fixes <borgbase#2204>.
Hi, thanks for the PR! So this opens the main window, if no system tray is available? How about changing the foreground setting we already have to be enabled, if no system tray is there? |
Yes.
It's your choice--but it's a user setting so I wouldn't expect it to be auto-changed. What if you just used vorta in vnc for a minute (so systray was unavailable for a minute) but systray is now available again? I would be miffed if that enabled the setting permanently. |
I tested this issue using the flatpak version of vorta 0.10.3 on MX Linux (XFCE). To investigate the behavior, I created a small script: from PyQt6.QtWidgets import QApplication, QSystemTrayIcon
import sys
app = QApplication(sys.argv)
tray_available = QSystemTrayIcon.isSystemTrayAvailable()
print("System tray available:", tray_available)
sys.exit() I removed the system tray from the panel and ran the script. The output was: I didn't see any errors like you mentioned in your issue #2204, even without system tray vorta is running fine, so maybe this is an isolated incident?
|
I don't know. Did you see this part?
So I think maybe also remove the connect to systemTrayWindowChanged for testing it, please. For comparison, I use wayland and vulkan and in general 2025 technology on the computer this happened on. I have no idea whether it would happen on Xorg or gdk-pixbuf or similar. In general, I didn't dig into this because I had too much time on my hands but rather because I couldn't get to my backups at all, again and again, for more than a week. I carry a local vorta patch that gets auto-applied on every update, so whether or not the patch lands upstream I don't care so much. That said, if you want to get to the bottom of this, we can. If you look at the source code, I don't understand how, in your case, it could present the main window if no one ever calls self.open_main_window_action. Seems strange to me. Could you please add
to the body of open_main_window_action and see who it is that calls it? |
Yes, I did and I'm not sure about what error PyQt throws when there's no tray available but this looks like a signal not found issue. I googled the same and I saw this mentioned in stackoverflow as a PyQt5 issue:
But we use PyQt6 so I'm not sure why this would be happening. I also found the same in an old vorta's issue. Also I found this in an archwiki:
Here's the stacktrace (I added the system tray check in the code):
This env variable |
Ok, so But in my case I have not set that setting for several months (years?)--that is, the setting is not eabled. Now, the tray became unavailable and then I couldn't enter vorta anymore, not even to set that setting. What the patch here would do is in that case force showing something anyway, for now. (The setting is not changed since if the tray becomes available again, the user presumably still doesn't want the main window to open automatically, as the user indicated) |
Aha, easy way to reproduce is Also |
So there are two issues here, one the error you are getting, second the functionality issue you mentioned regarding the setting "Show main window of vorta on launch". First: Error issue PS: Don't forget to Second: Unavailability of vorta window
Without a system tray, user doesn't seem to have an option to open the window to even switch the setting back. I have tested out the new addition with all the possibilities, and everything seems to work as expected. Please let us know about the error issue, so that we can move this forward. |
In both cases, a tray icon shows up. Next, I'll try with intentionally killed tray.
The "qt.core.qobject.connect: QObject::connect: No such signal QPlatformNativeInterface::systemTrayWindowChanged(QScreen*)" doesn't seem to show up above.
In the three latter cases (listed before here) it's not possible to get into vorta at all as a user. |
Thanks! It seems like the error is an isolated issue related to the individual desktop environment. I don't think there's much we can do to solve it, especially since, as I mentioned, the variable wasn't even set in my case. Also we shouldn't forcibly set any unnecessary environment variables on users' systems. That said, this PR does fix an annoying issue by giving users a way to use Vorta when the |
Fixes #2204.
Description
Related Issue
#2204
Motivation and Context
vorta should provides a means of interaction for the user even if the system tray is unavailable.
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.