LBCrion / sfwbar

S* Floating Window Bar
GNU General Public License v3.0
275 stars 17 forks source link

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

Closed kode54 closed 2 days ago

kode54 commented 1 month ago

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

LBCrion commented 1 month ago

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);
kode54 commented 1 month ago

Yes, now the menu opens.

LBCrion commented 1 month ago

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

kode54 commented 1 month ago

Yes, that works.