Losing button clicks

Language: Python 3.12
OS: Manjaro Linux, xfce Window manager, so X11
Gtk 4.14.5
Adw: 1.5.3

My app is a homegrown media organizer/player.

I have a toolbar which is a horizontal Gtk.Box set as a top bar in an Adw.ToolbarView.
I’m seeing an issue that a toolbar button misses clicks unless I move the mouse between clicks. The scenario is that the button moves to the next picture. It works fine on the first click. If I click again, nothing happens. If I click a third time, the app moves to the next picture. If I jiggle the mouse between the first and second clicks, the app moves to the next picture on the second click. So it looks like the button needs “something to happen” between clicks.

I put a print() into my signal handler - it doesn’t fire for the missing clicks, so I don’t think it’s a problem inside the signal handler.

I don’t see the problem on other buttons, except intermittently in my video player. That’s a similar scenario - repeatedly clicking a button without moving the mouse between clicks. I’ve tried waiting long enough to avoid triggering double click.

Please let me know how to get the relevant traces to see what’s going on. I tried reproducing in a small app to give sample code, but didn’t see the problem. So I’m not expecting a solution here - just advice on how I debug and find the solution myself.

Cheers,
Pat

Probably related to AdwToolbarView toolbars having a GtkWindowHandle inside them, so that they are draggable. Now, why would GtkWindowHandle block clicks - probably some X11-specific GTK bug.

Hi Alice,

So I don’t send you on a wild goose chase, the button where it happens intermittently is just in a horizontal box packed into another box in another box (…) that is added to the Adw.ToolbarView as a set_content. So I don’t think that Adw.ToolbarView toolbars are necessarily to blame.

Hence looking for advice on tracking this down myself.

Cheers,
Pat

Ah, content, not a toolbar. Even then, it’s likely a GTK bug and likely X11-specific

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.