summaryrefslogtreecommitdiff
path: root/testsuite/gtk/Makefile.am
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-12-16 12:25:54 -0500
committerRyan Lortie <desrt@desrt.ca>2014-01-07 19:29:05 -0500
commit2fd307fdb3d62312fe5c49f0abcb9f4577a1c9c7 (patch)
treefaca5b4a74a4fccbc9c26d81fe65ae729b745ffd /testsuite/gtk/Makefile.am
parent851d5f1c7d66a726f483b71c0aba22c44ba3f2ab (diff)
downloadgtk+-2fd307fdb3d62312fe5c49f0abcb9f4577a1c9c7.tar.gz
Fix GtkApplicationWindow action group implementation
GtkApplicationWindow frees its internal action group on dispose for the usual reasons: to avoid the possibility of reference cycles caused by actions referring back to the window again. Unfortunately, if it happens to be inside of a GtkActionMuxer at the time that it is disposed, it will (eventually) be removed from the muxer after it has been disposed. Removing an action group from a muxer involves a call to g_action_group_list_actions() which will crash because the internal action group to which we normally delegate the call has been freed. A future patch that reworks the quartz menu code will introduce a use of GtkActionMuxer in a way that causes exactly this problem. We can guard against the problem in a number of ways. First, we can avoid the entire situation by ensuring that we are removed from the muxer before we destroy the action group. To this end, we delay destruction of the action group until after the chain-up to the dispose of GtkWindow (which is where the window is removed from the GtkApplication). Secondly, we can add checks to each of our GActionGroup and GActionMap implementation functions to check that the internal action group is still alive before we attempt to delegate to it. We have to be careful, though: because our _list_actions() call will suddenly be returning an empty list, people watching the group from outside will have expected to see "action-removed" calls for the now-missing items. Make sure we send those. but only if someone is watching. https://bugzilla.gnome.org/show_bug.cgi?id=710351
Diffstat (limited to 'testsuite/gtk/Makefile.am')
0 files changed, 0 insertions, 0 deletions