sfwbar icon indicating copy to clipboard operation
sfwbar copied to clipboard

No menu in Vesktop and possibly other Electron apps' tray icons

Open kode54 opened this issue 1 year ago • 4 comments

Possibly related to this, possibly not:

https://github.com/LBCrion/sfwbar/issues/222

Here's what the menu looks like under sfwbar:

image

Tray doesn't even work now in ironbar, so I'll report that to them. Though the menu does work from Waybar:

image

kode54 avatar Oct 09 '24 02:10 kode54

Can you please check if the below patch (vs the latest git) helps?

diff --git a/src/snimenu.c b/src/snimenu.c
index d1e86c8..fde43da 100644
--- a/src/snimenu.c
+++ b/src/snimenu.c
@@ -264,7 +264,7 @@ static void sni_menu_get_layout_cb ( GObject *src, GAsyncResult *res,

   g_variant_get(result, "(u(i@a{sv}av))", &rev, &id, &dict, &iter);

-  if(rev > GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sni->menu_obj), "rev")))
+/*  if(rev > GPOINTER_TO_INT(g_object_get_data(G_OBJECT(sni->menu_obj), "rev")))
   {
     menu = sni_menu_item_find(sni->menu_obj, id);
     if( (parent = gtk_menu_get_attach_widget(GTK_MENU(menu))) )
@@ -272,7 +272,8 @@ static void sni_menu_get_layout_cb ( GObject *src, GAsyncResult *res,
     else
       sni_menu_parse(menu, iter);
     g_object_set_data(G_OBJECT(sni->menu_obj), "rev", GINT_TO_POINTER(rev));
-  }
+  }*/
+  sni_menu_parse(sni->menu_obj, iter);

   g_variant_iter_free(iter);
   g_variant_unref(dict);

LBCrion avatar Oct 09 '24 06:10 LBCrion

Yes, now the menu opens.

kode54 avatar Oct 09 '24 11:10 kode54

This is most likely caused by incorrect revision number being sent. Can you please check if the latest git version works ok for you (without the patch)?

On Wed, Oct 9, 2024 at 12:04 PM Christopher Snowhill < @.***> wrote:

Yes, now the menu opens.

— Reply to this email directly, view it on GitHub https://github.com/LBCrion/sfwbar/issues/242#issuecomment-2402011592, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASHPFFHZAHVG4PME66MB4IDZ2UEUHAVCNFSM6AAAAABPTQYZ5OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBSGAYTCNJZGI . You are receiving this because you commented.Message ID: @.***>

LBCrion avatar Oct 09 '24 18:10 LBCrion

Yes, that works.

kode54 avatar Oct 10 '24 02:10 kode54