Skip to content
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

Tray D-Bus Menu #6249

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Tray D-Bus Menu #6249

wants to merge 1 commit into from

Conversation

FlexW
Copy link

@FlexW FlexW commented May 2, 2021

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.

@emersion
Copy link
Member

emersion commented May 2, 2021

@ianyfan @nmschulte It seems like #5161 is dead

Yes, this PR has been looking for a new owner for a while. Thanks for taking over!

@nmschulte
Copy link
Contributor

@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 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.

@FlexW
Copy link
Author

FlexW commented May 2, 2021

@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 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.

@nmschulte
Copy link
Contributor

nmschulte commented May 2, 2021 via email

@Xyene
Copy link
Member

Xyene commented May 2, 2021

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.

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.

@nmschulte
Copy link
Contributor

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.

@nmschulte
Copy link
Contributor

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.

😃 All of the popups seem to be working on this branch (flexw/tray-dbus-menu). swaybar crashed during my first smoke test, however. More to come.

@FlexW
Copy link
Author

FlexW commented May 3, 2021

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.

All of the popups seem to be working on this branch (flexw/tray-dbus-menu). swaybar crashed during my first smoke test, however. More to come.

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.

@FlexW
Copy link
Author

FlexW commented May 10, 2021

@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 :)

@nmschulte
Copy link
Contributor

@FlexW after merging master and dealing with wayland-protocol version issues, I've managed to build this branch and use it for about a week. I haven't yet had time to review the code changes, however.
I do see a few bugs and swaybar crashes still, related to sub-menu interactions. I'll investigate and follow up when I can.

@TimB87
Copy link

TimB87 commented Jun 21, 2021

uneducated question: is there a possibility that this might work with basu as well?

@emersion
Copy link
Member

It should, yes.

@FlexW FlexW force-pushed the feature/tray-dbus-menu branch 4 times, most recently from c56a8cb to e212e13 Compare July 31, 2021 19:31
@FlexW
Copy link
Author

FlexW commented Jul 31, 2021

@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.

@FlexW
Copy link
Author

FlexW commented Aug 1, 2021

@ianyfan @emersion One more question: It seems like the wl_pointer_button, wl_pointer_motion event and dbus events etc run in parallel. How would you advise avoiding race conditions while operating on the swaybar_dbusmenu structure? Mutexes?

@emersion
Copy link
Member

emersion commented Aug 1, 2021

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.

@FlexW
Copy link
Author

FlexW commented Aug 1, 2021

@emersion Thank you for clarifying. Will a call to wl_display_roundtrip() lead to dispatching events? So if I call it in a function I will after wl_display_roundtrip() returns have code running in parallel?

EDIT: Probably not, because there is only one thread.

@nmschulte
Copy link
Contributor

I finally managed to build this (caved and built libdrm, wayland-protocols); sorry my report is shallow.

I managed to crash swaybar playing with udiskie again; I only managed it once and have no logs.

Both udiskie and nm-applet menus seem to flicker more than I'd like to see as a user.

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.

image

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?).
I was unable to use my key binding to launch dmenu; gimp's menubar would not... popup, even though the interaction feedback seemed to work. Just prior, I was using screenshot.sh (dmenu) to take a shot of the open popup(s) from swaybar (which works great/is possible as long as I don't have to click), which uses mako to notify the success (popup?).
In the end, I was able to rectify things after mashing the keyboard, switching workspaces, clicking / changing focus, etc. without restarting sway. 🤷 I've spoke about similar things in the original PR.

@FlexW FlexW force-pushed the feature/tray-dbus-menu branch 5 times, most recently from 5944eb9 to f641e58 Compare September 10, 2021 22:35
@FlexW
Copy link
Author

FlexW commented Sep 10, 2021

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, udiskie does just sometimes blink for me one time when I open the menu. Submenus work also fine.

Maybe one of the maintainers can help with getting the last flickering and focus problems away.

@emersion

@FlexW
Copy link
Author

FlexW commented Dec 15, 2022

@kennylevinsen I resolved all review comments. I appreciate another review round.

@mattfbacon
Copy link
Contributor

FYI, you can squash when the PR is merged so you don't have to force-push and lose the history.

@bim9262
Copy link

bim9262 commented Jan 16, 2023

I've been using this commit for a few weeks now at it's working great, but just noticed that the tray menus only display on my leftmost screen, but not on my right screen.

@TimB87
Copy link

TimB87 commented Jan 16, 2023

I noticed that right clicking the QOwnNotes icon (among others that I forgot) have the ability to crash the bar (I use this with i3status-rust).
I'll try to get a trace why this happens.

@michaelweiser
Copy link
Contributor

noticed that the tray menus only display on my leftmost screen, but not on my right screen.

Same here. I've played around with it a bit and found that the menu only shows on the display rooted at coordinates 0 0. So with the following in sway config it shows only on eDP-1:

output eDP-1 position 0 0
output DP-1 position -3840 -1080

With this it shows on DP-1 and not on eDP-1:

output DP-1 position 0 0
output eDP-1 position 3840 0

It doesn't matter whether the coordinates are negative or not. With this it still only shows on eDP-1:

output eDP-1 position 0 0
output DP-1 position 1920 0

With this config it shows on neither display:

output DP-1 position 1920 10
output eDP-1 position 5760 10

With this config it shows on DP-1 but offset to the right by what could well be 300 pixels:

output DP-1 position 300 0
output eDP-1 position 4140 00

With this config swaybar crashes when clicking on any tray icon on any display:

output DP-1 position -300 0
output eDP-1 position 3540 00

With "shows" I mean that the icons are there on all displays but only on one display clicking on them actually shows the menu. On the other nothing happens when clicking the icon. The click does seem to reach swaybar though since in both cases it logs:

/usr/libexec/gdm-wayland-session[472736]: 00:06:30.495 [ERROR] [swaybar/tray/dbusmenu.c:1060] :1.21/org/blueman/sni/menu failed to read IconThemePath: Invalid argument

(In this case blueman tray just as an indicator that the action is received and the actual error very likely totally unrelated to showing the menu or not as it happened with older commits as well which showed the menu on both displays.)

@joanbm
Copy link
Contributor

joanbm commented Jan 16, 2023

@michaelweiser @bim9262 This seems the same as the positioning issue I mentioned on #6249 (comment)

@michaelweiser
Copy link
Contributor

@joanbm: Duh, yes. I can confirm that the change from your comment fixes the issue. Thanks!

Co-authored-by: Ian Fan <ianfan0@gmail.com>
Co-authored-by: Nathan Schulte <nmschulte@gmail.com>

Signed-off-by: Felix Weilbach <felix.weilbach@t-online.de>
@FlexW
Copy link
Author

FlexW commented Jan 16, 2023

I've included the fix from @joanbm. Thanks for all the testing. I don't use that PR myself. I switched a long time ago to Waybar. However, I'm still interested in getting this merged.
@TimB87 are you using the latest version of this PR? I couldn't reproduce crashes with this note app.

@lbatalha
Copy link

lbatalha commented Jan 23, 2023

I have replicated @TimB87 crash with QOwnNotes. It appears I can only make it crash on right click once after the program is first started, when I restart swaybar everything works from then on.
To reproduce:

  • Start sway
  • Start QOwnNote (with tray icon enabled in settings)
  • Right click the tray icon - nothing should happen
  • Move the mouse to another output - swaybar will crash

Notes:

  • Moving focus in the same way using the keyboard does not seem to trigger this, only with the mouse (perhaps there is another method I am missing, but just $mod+# to any workspace on another output seems to not crash (as soon as you move the mouse to another workspace, it does)
  • My output layout consists of 4 displays as such:
3 horizontal displays with a top center one, all effectively scaled to 3840x2160
output "leftdisplay" pos 0 2160 res 3840x2160 scale 1
output "topcenterdisplay" pos 3840 0 res 1920x1080 scale 0.5
output "right display" pos 7680 2160 res 2560x1440 scale 0.666666
output "centerdisplay" pos 3840 2160 res 3840x2160 scale 1
  • Right clicking the tray in any of the outputs causes this problem
  • This only seems to happen the first time the program is launched, after I reload sway the right click menu works indefinitely as far as I can tell

Logs:

Jan 23 23:36:16 home sway[2035]: 00:00:51.969 [INFO] [swaybar/tray/host.c:24] Registering Status Notifier Item ':1.87/StatusNotifierItem'
Jan 23 23:36:28 home sway[2035]: Warning: Wayland does not support QWindow::requestActivate() ((null):0, (null))
Jan 23 23:36:28 home sway[2035]: Warning: Wayland does not support QWindow::requestActivate() ((null):0, (null))
Jan 23 23:36:29 home sway[2035]: 00:01:05.087 [ERROR] [swaybar/tray/dbusmenu.c:892] :1.87/NO_DBUSMENU failed to get layout: No such object path '/NO_DBUSMENU'
Jan 23 23:36:29 home sway[2035]: 00:01:05.087 [ERROR] [swaybar/tray/dbusmenu.c:1060] :1.87/NO_DBUSMENU failed to read IconThemePath: Invalid request descriptor
[GTK errors here from things that are in the tray, like transmission-gtk]
Jan 23 23:36:38 home sway[2035]: thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:1017:9
Jan 23 23:36:38 home sway[2035]: stack backtrace:
Jan 23 23:36:38 home sway[2035]:    0:     0x55660d44b7dc - <unknown>
Jan 23 23:36:38 home sway[2035]:    1:     0x55660d4729ec - <unknown>
Jan 23 23:36:38 home sway[2035]:    2:     0x55660d444fe1 - <unknown>
Jan 23 23:36:38 home sway[2035]:    3:     0x55660d44d425 - <unknown>
Jan 23 23:36:38 home sway[2035]:    4:     0x55660d44d0c8 - <unknown>
Jan 23 23:36:38 home sway[2035]:    5:     0x55660d44d983 - <unknown>
Jan 23 23:36:38 home sway[2035]:    6:     0x55660d44d867 - <unknown>
Jan 23 23:36:38 home sway[2035]:    7:     0x55660d44bc74 - <unknown>
Jan 23 23:36:38 home sway[2035]:    8:     0x55660d44d589 - <unknown>
Jan 23 23:36:38 home sway[2035]:    9:     0x55660d0b36d3 - <unknown>
Jan 23 23:36:38 home sway[2035]:   10:     0x55660d444243 - <unknown>
Jan 23 23:36:38 home sway[2035]:   11:     0x55660d10d155 - <unknown>
Jan 23 23:36:38 home sway[2035]:   12:     0x55660d1451af - <unknown>
Jan 23 23:36:38 home sway[2035]:   13:     0x55660d229ef3 - <unknown>
Jan 23 23:36:38 home sway[2035]:   14:     0x55660d2487f9 - <unknown>
Jan 23 23:36:38 home sway[2035]:   15:     0x55660d43ed3e - <unknown>
Jan 23 23:36:38 home sway[2035]:   16:     0x55660d149812 - main
Jan 23 23:36:38 home sway[2035]:   17:     0x7fb917f22290 - <unknown>
Jan 23 23:36:38 home sway[2035]:   18:     0x7fb917f2234a - __libc_start_main
Jan 23 23:36:38 home sway[2035]:   19:     0x55660d0b39c5 - <unknown>
Jan 23 23:36:38 home sway[2035]:   20:                0x0 - <unknown>
Jan 23 23:36:38 home sway[2035]: 00:01:15.093 [ERROR] [sway/ipc-server.c:206] IPC Client socket error, removing client

I had debug symbols installed so here is the correct stacktrace from the core dump:

 Message: Process 9138 (swaybar) of user 1000 dumped core.
          
          Stack trace of thread 9138:
          #0  0x000055fb840e765b dbusmenu_menu_find_menu_surface (swaybar + 0x1465b)
          #1  0x000055fb840dd0e1 wl_pointer_enter (swaybar + 0xa0e1)
          #2  0x00007fb9d0da74f6 n/a (libffi.so.8 + 0x74f6)
          #3  0x00007fb9d0da3f5e n/a (libffi.so.8 + 0x3f5e)
          #4  0x00007fb9d0da6b73 ffi_call (libffi.so.8 + 0x6b73)
          #5  0x00007fb9d181d645 n/a (libwayland-client.so.0 + 0x7645)
          #6  0x00007fb9d181de03 n/a (libwayland-client.so.0 + 0x7e03)
          #7  0x00007fb9d181dffc wl_display_dispatch_queue_pending (libwayland-client.so.0 + 0x7ffc)
          #8  0x000055fb840db98a display_in (swaybar + 0x898a)
          #9  0x000055fb840da5e2 main (swaybar + 0x75e2)
          #10 0x00007fb9d156c290 n/a (libc.so.6 + 0x23290)
          #11 0x00007fb9d156c34a __libc_start_main (libc.so.6 + 0x2334a)
          #12 0x000055fb840dab65 _start (swaybar + 0x7b65)

The QWindow::requestActivate() Qt warnings are probably unrelated, and a Qt bug, since I get them in other Qt programs, they appear each time the program appears when I left click the tray icon. The first log message was when I launched the program the first time.
The dbusmenu.c error on line 1060 happens each time regardless on every subsequent right click, even after I have reloaded sway with a new swaybar, and no crashes happen.

EDIT: added proper stack track since I actually had debug symbols available and a coredump

@TimB87
Copy link

TimB87 commented Jan 25, 2023

@FlexW Yes I am (edit: no I am not because since posting my comment there have been more commits)
@lbatalha Thanks for adding the info, I haven't had the time yet!

@ianyfan ianyfan mentioned this pull request Feb 27, 2023
5 tasks
Comment on lines +1162 to +1163
struct swaybar_dbusmenu_menu *focused_menu = tray->menu_pointer_focus;
if (!(tray && tray->menu && focused_menu)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've started testing this branch out, and I just got a segmentation fault here due to tray being NULL, so this !tray check may need to occur sooner.

However, the context was that I was running a bar without a tray. I'm not entirely sure why this callback even runs in that case, it would be good to check whether it makes sense to try to disable it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you test if my patch below alleviates the issue? The null check should probably still be fixed, otherwise it serves no purpose.

@SebTM
Copy link

SebTM commented Apr 14, 2023

Hey, I was watching this PR frequently and happy about the activity but it seems to stagnate a bit, is there something I / we can support on to get this further? Personally it's an important feature to me :)

@FlorianFranzen
Copy link
Contributor

FlorianFranzen commented May 11, 2023

I had to fix some uninitialized variables and add some check to not invoke the dbus menu when the tray is disabled and while it works mostly well, I still get some random crashes when interacting with the tray with some inside dbusmenu_menu_find_menu_surface, so there is clearly some work left to do.

You can find my changes below.
diff --git a/swaybar/input.c b/swaybar/input.c
index 4ee4915991..8487eeb74a 100644
--- a/swaybar/input.c
+++ b/swaybar/input.c
@@ -118,8 +118,9 @@ static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,
  update_cursor(seat);

#if HAVE_TRAY
-	if (dbusmenu_pointer_enter(data, wl_pointer, serial, surface, surface_x,
-		surface_y)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_enter(data, wl_pointer, serial,
+		surface, surface_x, surface_y)) {
  	return;
  }
#endif
@@ -127,13 +128,14 @@ static void wl_pointer_enter(void *data, struct wl_pointer *wl_pointer,

static void wl_pointer_leave(void *data, struct wl_pointer *wl_pointer,
  	uint32_t serial, struct wl_surface *surface) {
+	struct swaybar_seat *seat = data;
#if HAVE_TRAY
-	if (dbusmenu_pointer_leave(data, wl_pointer, serial, surface)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_leave(data, wl_pointer, serial,
+		surface)) {
  	return;
  }
#endif
-
-	struct swaybar_seat *seat = data;
  seat->pointer.current = NULL;
}

@@ -143,7 +145,9 @@ static void wl_pointer_motion(void *data, struct wl_pointer *wl_pointer,
  seat->pointer.x = wl_fixed_to_double(surface_x);
  seat->pointer.y = wl_fixed_to_double(surface_y);
#if HAVE_TRAY
-	if (dbusmenu_pointer_motion(data, wl_pointer, time, surface_x, surface_y)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_motion(data, wl_pointer, time,
+		surface_x, surface_y)) {
  	return;
  }
#endif
@@ -185,8 +189,9 @@ static void wl_pointer_button(void *data, struct wl_pointer *wl_pointer,
  	uint32_t serial, uint32_t time, uint32_t button, uint32_t state) {
  struct swaybar_seat *seat = data;
#if HAVE_TRAY
-	if (dbusmenu_pointer_button(seat, wl_pointer, serial, time, button,
-				state)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_button(seat, wl_pointer, serial,
+		time, button, state)) {
  	return;
  }
#endif
@@ -308,7 +313,8 @@ static void wl_pointer_axis(void *data, struct wl_pointer *wl_pointer,
  }

#if HAVE_TRAY
-	if (dbusmenu_pointer_axis(data, wl_pointer)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_axis(data, wl_pointer)) {
  	return;
  }
#endif
@@ -330,7 +336,8 @@ static void wl_pointer_frame(void *data, struct wl_pointer *wl_pointer) {
  struct swaybar_output *output = pointer->current;

#if HAVE_TRAY
-	if (dbusmenu_pointer_frame(data, wl_pointer)) {
+	struct swaybar_config *config = seat->bar->config;
+	if (!config->tray_hidden && dbusmenu_pointer_frame(data, wl_pointer)) {
  	return;
  }
#endif
diff --git a/swaybar/tray/dbusmenu.c b/swaybar/tray/dbusmenu.c
index 8821cacaec..909730bea5 100644
--- a/swaybar/tray/dbusmenu.c
+++ b/swaybar/tray/dbusmenu.c
@@ -592,7 +592,7 @@ static void swaybar_dbusmenu_draw_menu(struct swaybar_dbusmenu_menu *menu,
  	cairo_surface_destroy(recorder);
  	return;
  }
-	int surface_x, surface_y, surface_width, surface_height;
+	int surface_x = 0, surface_y = 0, surface_width = 0, surface_height = 0;
  draw_menu_items(cairo, menu, &surface_x, &surface_y, &surface_width,
  				&surface_height, open);

diff --git a/swaybar/tray/tray.c b/swaybar/tray/tray.c
index b0545f4a70..e4a680342b 100644
--- a/swaybar/tray/tray.c
+++ b/swaybar/tray/tray.c
@@ -110,7 +110,7 @@ static int cmp_output(const void *item, const void *cmp_to) {

uint32_t render_tray(cairo_t *cairo, struct swaybar_output *output, double *x) {
  struct swaybar_config *config = output->bar->config;
-	if (config->tray_outputs) {
+	if (config->tray_outputs && !config->tray_hidden) {
  	if (list_seq_find(config->tray_outputs, cmp_output, output) == -1) {
  		return 0;
  	}

@FlexW Are you planing to continue your work on this?

@DemiMarie
Copy link

@FlorianFranzen ASAN+UBSAN should help diagnose the crashes. Afterwards, I recommend fuzzing the D-Bus API to ensure it is robust against e.g. malicious sandboxed flatpak apps.

@DemiMarie
Copy link

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.

@kittybwained
Copy link

Any news on this?

Guanran928 added a commit to Guanran928/flake that referenced this pull request Feb 24, 2024
swaywm/sway#7226 is merged
swaywm/sway#6249 looks dead :(

also simplified ./overlays
@NickHu
Copy link

NickHu commented Mar 2, 2024

This patch no longer cleanly applies on newer versions of sway.
I've rebased this on top of sway 1.9 here: https://github.com/NickHu/sway/tree/feature/tray-dbus-menu-1.9, incorporating @FlorianFranzen's changes above.
As far as I am concerned, I have been using this patch for years and never experienced any instability, so even if it's not perfect and there are edge cases I would be happy to see this merged.

@Jamim
Copy link

Jamim commented Mar 16, 2024

Hello @NickHu,

I've rebased this on top of sway 1.9 here: NickHu/sway@feature/tray-dbus-menu-1.9, incorporating @FlorianFranzen's changes above.

Would you mind submitting an alternative PR?

Thanks in advance!

@DemiMarie
Copy link

@NickHu would you mind fuzzing this to ensure it is safe and secure against malicious D-Bus clients?

@NickHu
Copy link

NickHu commented Mar 18, 2024

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.

@llyyr
Copy link
Contributor

llyyr commented Aug 22, 2024

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

@DemiMarie
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or incremental improvement
Development

Successfully merging this pull request may close these issues.

None yet