-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Tray D-Bus Menu #6249
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?
Tray D-Bus Menu #6249
Conversation
Yes, this PR has been looking for a new owner for a while. Thanks for taking over! |
@FlexW Thank you for doing this. I would like to support you however I can. Please see my branch from #5161 work; https://github.com/nmschulte/sway/tree/fix-tray-updates. It has improved message handling to resolve some the standing issues of #5161; it is based upon current This is all I have for now; I will be following closely. Later I will check your list and my notes and share any new items I've thought about to incorporate. |
Thank you for your support. I'll check your branch out. I think I had the same scaling issue that you described, and I think that issue is resolved in my branch. There was an issue with not specifying the correct size of the buffer when scaling is activated. If you want you can check out my branch and see if the scaling issue is gone for you too. |
👍 I hope to dive through the diff later this week.
…On Sun, May 2, 2021, 1:41 PM Felix Weilbach ***@***.***> wrote:
@FlexW <https://github.com/FlexW> Thank you for doing this. I would like
to support you however I can.
Please see my branch from #5161 <#5161>
work; https://github.com/nmschulte/sway/tree/fix-tray-updates. It has
improved message handling to resolve some the standing issues of #5161
<#5161>; it is based upon current
master/master, and I rebase it locally about once a week to continue
using it. Since 1.6 / wlroots 1.2/1.3, something has broken for me w/re:
non-1.0 DPI scaling and popups, such that most apps no longer work to show
menus in this scenario.
This is all I have for now; I will be following closely. Later I will
check your list and my notes and share any new items I've thought about to
incorporate.
Thank you for your support. I'll check your branch out. I think I had the
same scaling issue that you described, and I think that issue is resolved
in my branch. There was an issue with not specifying the correct size of
the buffer when scaling is activated. If you want you can check out my
branch and see if the scaling issue is gone for you too.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#6249 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBFAT6TYWVL7JLF63C5XS3TLWMENANCNFSM437SF2HQ>
.
|
Does #6147 match what you're describing? If so and you're experiencing it with other apps, would be worth leaving a note in that thread. |
@Xyene I don't think #6147 describes the issue, but I can try with external displays; experiencing this on a laptop with 4K display, no external monitors. Zoom does strange things with its menus under Wayland such that the menus popup on the wrong output or don't show at all, depending which output they're parented, on a top-bottom-plus-(rotated-)straddling-sides 4-output DPI==1 stationary desktop setup though. Also I see #6148 with this same setup. |
😃 All of the popups seem to be working on this branch ( |
Thats great to hear. I'm aware of that crash, it's because I don't handle the hotspots correct fow now. I'll let you know when I fixed it. |
3357c6b
to
a9e77fe
Compare
@nmschulte The crash that you experienced is gone now. You may experience other crashes or bugs. It's WIP. Just wanted to let you know :) |
a9e77fe
to
8914389
Compare
@FlexW after merging |
uneducated question: is there a possibility that this might work with |
It should, yes. |
c56a8cb
to
e212e13
Compare
@nmschulte Finally I found some time to work on it. Should now work better. So far I couldn't crash it anymore and it works as I would expect it with all my tray icons (nmapplet, nextcloud, udiskie, blueman, gammastep-indicator). I would appreciate it if you could do some tests too (I rebased against the latest master). Maybe you also know some more applications with which I can test. |
They don't run "in parallel", there's only one thread. The event loop will dispatch D-Bus events and Wayland events one after the other. No need for any kind of locking or race condition prevention. |
I finally managed to build this (caved and built I managed to crash Both Sub-menus are placed a bit off for me (2x scale), and there's an odd looking "bar"/line/border at the bottom of the sub-menus. Finally, and I'm not confident in my sway-term/understanding here, there's still something odd with focus, popups, and xwayland vs xdg_shell (backends?). |
5944eb9
to
f641e58
Compare
Thank you for your feedback @nmschulte. I would like to get this pr reviewed, because I think it works well enough and provides everything to do basic work with tray menus. There are some things that could be better, but I think it is usable. I can not crash it anymore, Maybe one of the maintainers can help with getting the last flickering and focus problems away. |
It’s quite possible that some of the crashes are due to libdbusmenu being buggy — it is unmaintained for several years now (since 2017, IIUC) and Waybar also has problems with it. |
Any news on this? |
swaywm/sway#7226 is merged swaywm/sway#6249 looks dead :( also simplified ./overlays
This patch no longer cleanly applies on newer versions of sway. |
Hello @NickHu,
Would you mind submitting an alternative PR? Thanks in advance! |
@NickHu would you mind fuzzing this to ensure it is safe and secure against malicious D-Bus clients? |
No thank you, I don't have either the expertise nor the willingness to undertake any development in sway. Anyone else is free to do whatever they like with my tiny contribution of rebasing. |
I've been daily driving this for a few days now, and besides one issue that I fixed here (llyyr@84481c2), it seems mostly stable now across the clients I use. fwiw I also rebased it on master here in case there's other people that want to test it out. https://github.com/llyyr/sway/tree/dbus-tray I don't really know what's needed to push this further besides some style nits I noticed |
Can you make a PR with all of the fixes? |
I have been keeping these patches on my own fork for a while now and I building a version of this package on Arch without any issues. What is preventing this from being merged? |
The tray-dbus-menu-1.9 branch on my fork contains all the patches and fixes from this branch. However, I'm not sure about the testing part. |
Feel free to open a PR then to drive this forward. |
Sure, I'll create a new branch, because that one is targeting the latest release, not main. |
Created #8405. Rebased it against master. |
I kinda need to use this patch, and I see people using it, but how can I actually start using it? |
You more want to use this PR : #8698 if you use arch I can provide you a PKGBUILD to automate everything, just ask. |
@GreyXor Yeah I use Arch, so a PKGBUILD would be appreciated!! |
I am not using sway at the moment, which is the reason I haven't touched this patch in a while. I was using a fork of sway on my personal account on top of which I applied the patches and then used Arch's sway PKGBUILD to point to this fork as the source. |
@Dantali0n #8698 is a rebase of #8405 which is a cleaned-up and patched version of this PR. So if we were to move forward it would be with #8698. |
@GreyXor Also if you are going to provide a PKGBUILD, do I need to uninstall sway before I make it or will it replace my current sway install? |
Hello, it will replace it. |
This might be useful here: I'm currently working on a new widget library and as an example I implemented a swaybar with full tray dbusmenu support: https://github.com/pd2s/sw/tree/master/examples/sw_swaybar |
This pull request implements D-Bus menus for the tray icons. @ianyfan @nmschulte It seems like #5161 is dead, and I would like to take over. Please tell me if this is not the case, then I will close this pull request.
This pull request is based on #5161 and is a draft for now. Please don't test it yet. When the pull request is ready for testing, I will say so.
@ianyfan @nmschulte I created this early pull request to let you know I'm working on it. Just in case that we do not double the work. Maybe you could add some other points that should be addressed before this pull request can be merged. I would say keyboard navigation and touch support can be done in a second pr.