Merge lp:~bregma/libgrip/lp-872022 into lp:libgrip

Proposed by Stephen M. Webb on 2012-05-29
Status: Merged
Merged at revision: 70
Proposed branch: lp:~bregma/libgrip/lp-872022
Merge into: lp:libgrip
Diff against target: 20 lines (+4/-4)
1 file modified
src/gripgesturemanager.c (+4/-4)
To merge this branch: bzr merge lp:~bregma/libgrip/lp-872022
Reviewer Review Type Date Requested Status
Jussi Pakkanen (community) 2012-05-29 Approve on 2012-05-30
Review via email:

Description of the change

Removes multiple deletes of an object due to a signal handler being called
multiple times when it should be called only once when walking backward up the
container-widget tree as it's created.

Fixed lp:872022. See bug description for steps to reproduce the problem.

To post a comment you must log in.
Jussi Pakkanen (jpakkane) wrote :

I can't claim that I fully understand the total logic flow between GTK and libgrip, but Stephen's explanation on IRC was reasonable and this fixes a serious bug without side-effects so approving.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gripgesturemanager.c'
2--- src/gripgesturemanager.c 2011-10-06 19:38:39 +0000
3+++ src/gripgesturemanager.c 2012-05-29 20:51:17 +0000
4@@ -1253,12 +1253,12 @@
5 GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
6 GripRegistrationRequest *req = (GripRegistrationRequest *)user_data;
8+ g_signal_handlers_disconnect_by_func (widget,
9+ G_CALLBACK (toplevel_notify_cb),
10+ user_data);
12 if (gtk_widget_is_toplevel (toplevel))
13 {
14- g_signal_handlers_disconnect_by_func (widget,
15- G_CALLBACK (toplevel_notify_cb),
16- user_data);
18 if (gtk_widget_get_mapped (GTK_WIDGET (toplevel)))
19 {
20 register_internal (req->manager,


People subscribed via source and target branches