Broken accounting of active state for GtkPopoverMenu widget

I have following notice, when sometimes open context menu for AdwTabView, menu appended with AdwTabView::set_menu_model

Gtk-WARNING **: Broken accounting of active state for widget 0x556f46265970(GtkPopoverMenu)

What could it be related with?
Fedora 41

I use SimpleAction.set_state for some menu items and TabView.setup-menu to change state, but not sure it’s related because notice randomly happen even without state updates

upd. when focus on tabs - everything okay, but when move focus out, to another widget then make left-click on tab again, it print this notice

Refer https://discourse.gnome.org/t/what-does-broken-accounting-of-active-state/24474/2.

2 Likes

Thanks for link, but finally don’t understand how can I fix it as using selection model with libadwaita TabBar API

It looks like GTK bug that happened when cursor moved immediately on click the tab element. Because of that micro-movement, I get the alert in debug and popover not react on menu selection.

Any chance to wait for fix or it should be resolved manually, anyway?

Interesting, just found this issue happen on Fedora only, and no any problems on Ubuntu 24.10. This bug or already fixed or not exist yet here.

You should check the GTK versions on the distros, than distros.

Ubuntu 24.10

pkg-config --modversion glib-2.0
2.82.1
pkg-config --modversion gtk4
4.16.2

On Fedora 41 will check later and update this message.

Fedora 41

pkg-config --modversion glib-2.0
2.82.2
pkg-config --modversion gtk4
4.16.5

p.s. previous message was locked, I’m also can’t add solutions found to some previous my subjects opened. one month is not enough to mark thread as locked imho.