-
-
Notifications
You must be signed in to change notification settings - Fork 251
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
'Minimize to tray' functionality using SNI (StatusNotifierItem) #1209
base: master
Are you sure you want to change the base?
Conversation
|
Awsome I will use the code you linked, where did you get that from ? Also I will fix the issues you addressed. |
BTW, I am meaning to redo the commits once you guys are happy with the code because I find them very ugly (no/bad messages, redundancy) if you would like that ofcourse. (and do rebase if needed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good beside a few minors. I'll do a bit of testing this weekend and merge if everything works as expected.
woopsie ignore the poundsign 2 that last commit, I didnt know that it has special meaning on gh |
Strange, I dont get that int to str error that makes the build fail on my machines. But when I was talking with the guy from xapps he also had the same issue. Do you guys know what is causing that ? |
Left click to systray works same a right - showed menu too, its problem only at me? xfce 4.16.0 |
@emildekeyser please "Fetch upstream" on you fork... |
It is (most likely) an XFCE problem. More specifically xfce4-panel is
probably not calling the 'Activate' dbus method on left click. I did
some looking around and strangly enough I did find this:
https://github.com/xfce-mirror/xfce4-panel/blob/master/plugins/systray/sn-item.c#L1082.
Maybe search the issues/post a bug at the official xfce4-panel repo about
this ?
…On 22/04/03 10:51, wkg wrote:
Left click to systray works same a right - showed menu too, its problem only at me? xfce 4.16.0
--
Reply to this email directly or view it on GitHub:
#1209 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
on it!
…On 22/04/03 11:16, wkg wrote:
@emildekeyser please "Fetch upstream" on you fork...
--
Reply to this email directly or view it on GitHub:
#1209 (comment)
You are receiving this because you were mentioned.
Message ID: ***@***.***>
|
I looked in the xfce-panel sources, they also noticed the problem: according to their code, this happens if "is_menu = true": i tried changed it in you fork to "false" and this is fixed it... |
i looked at the spec, actually setting is_menu to true is an error on my part, changing and testing it now |
It seems that on my old laptop running cinnamon (with no login manager) there is a race condition which causes the SNI icon to not show up on autostart. It can be fixed by adding some seconds delay. I could make the systray code concurently retry on failure or monitor dbus till it sees the watcher for X amount of seconds. I have inspected libappindicator's code a bit and they seem to be doing something similar (not 100% sure). |
@emildekeyser please "Fetch upstream" again for gtk4 |
I thought this might be a good idea in general. But also because I encountered problems with the SNI menu om Cinnamon I think it is nice to have an additional way of hard quitting the app. I think having only Ctrl-Q when the SNI dbus menu doesnt work is not very friendly to hotkey/tech illiterates (for which I am specifically adding this feature anyway).
Some DE software (observed in Cinnamon) uses EventGroup instead of just Event.
+ togglable in settings
Without this, ie when we just call watcher.register_item, there is a race condition between the registration of SNHost and SNItem. This can occur when your system is configured to launch Dino at login or on startup of the graphical environment. This was observed on Cinnamon on an old laptop. But I assume it is a problem that could very well occur in more places. I am hoping that this is the only race condition in this scenario, I have done some testing manually and it seems to be fixed.
done |
this only on my system? |
well I dont get that on my system |
rm -r build and rebuild fix my problem.... The only thing missing is changing the icon when a new message arrives... |
alright il look into adding that, you mean whenever there are any unread msgs there should be a little envelope or something in the corner of the dino icon ? |
yes, or just change icon if any new message(if window not in focus) and change back after focus window |
icon.patch.txt |
i continue testing, and another wish: keep the position/sizes of the window when it is hidden/showed if it is possible |
I was testing your pull request and it is working fine I only found a small issue. |
It's unfortunate to see this feature is not merged in Dino. However, I would like to inform anyone it may concern that this code has been really helpful to me in order to continue indicator support in Haguichi, which I very recently ported to GTK4 and libadwaita. Without the existence of this example I would likely have dropped indicator support. But now the indicator is even working on more distros than before, because this implementation doesn't depend on libappindicator! I made few minor modifications to suit specific needs for Haguichi. But I also made some more generic tweaks to update the menu item properties and to set the The modified file contains attribution to the "Dino contributors". Let me know if you are an author and would like to be personally attributed using your real name. Thanks! |
Issue: #98
progress: