actionmuxer: Correctly notify actions after reparenting
authorAlice Mikhaylenko <alexm@gnome.org>
Thu, 1 Jun 2023 02:27:10 +0000 (06:27 +0400)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 5 Jun 2023 12:02:33 +0000 (08:02 -0400)
commitdfc66ffd936f50a50d0a9c280ea9fa02e7dac8f3
tree571e950db8f1a8fdccacb119b0452e7299aac915
parent7513fd5d6440a87c290f61455a2c355ed200073a
actionmuxer: Correctly notify actions after reparenting

When registering an observer, we send a notification and for that we need
to query the action's state and param type. When setting up a muxer parent,
same thing happens, except the action is queried on the parent instead.

This means that the muxer will notify observers about the parent's actions,
but not about its own.

Add a test to verify it works.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5861
gtk/gtkactionmuxer.c
testsuite/gtk/action.c