actionmuxer: Correctly notify actions after reparenting
authorAlice Mikhaylenko <alexm@gnome.org>
Thu, 1 Jun 2023 02:27:10 +0000 (06:27 +0400)
committerAlice Mikhaylenko <alexm@gnome.org>
Thu, 1 Jun 2023 02:39:44 +0000 (06:39 +0400)
commit1549ec5f9b88df5a18437eafb2674f87fb6c2fab
tree27c60b03f2a5815fffa4e6f810d011091fa89bd6
parent19f51b5de29c08b6dcc8e0cfbbdfa7b89e2e0f1c
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