Can't block GtkSearchEntry handlers from emission
Steps to reproduce
- I created a sample application to show off the problem. Download searchentry-0.1.0.tar.xz
- Build with
meson build && ninja -C build
- Start with
build/src/searchentry
- Search in GtkSearchEntry for "foo"
- The GtkTextView should print something like "got signal"
- Click the button "add text and block" which blocks the signal handler and adds the text "block" into the SearchEntry
Current behavior
The handler emits and prints "got signal"
Expected outcome
The handler should be block during insertions and should not trigger.
Version information
Fedora 30 GNOME 3.32.2
Additional information
I examined the code in question for the GtkSearchEntry. The problem is basically that the search entry triggers after 150ms delay with a GTimeout GSource. This will be added during insertion for the entry. After the delay the signal fires. But i block the signal handler during insertion and unblock after insertion.
I have no idea how we could fix this but right now it is not possible to prevent the handler from triggering which is sad.
Edited by Günther Wagner