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

Proposed by Stephen M. Webb on 2011-09-22
Status: Merged
Merged at revision: 62
Proposed branch: lp:~bregma/libgrip/lp-830640
Merge into: lp:libgrip
Diff against target: 54 lines (+11/-10)
1 file modified
src/gripgesturemanager.c (+11/-10)
To merge this branch: bzr merge lp:~bregma/libgrip/lp-830640
Reviewer Review Type Date Requested Status
Chase Douglas (community) 2011-09-22 Approve on 2011-09-22
Review via email: mp+76643@code.launchpad.net

Description of the change

Removed the GIO channel from the main lop on shutdown to prevent stray events from being posted.

To post a comment you must log in.
Chase Douglas (chasedouglas) wrote :

Looks right to me

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/gripgesturemanager.c'
--- src/gripgesturemanager.c 2011-09-19 13:45:46 +0000
+++ src/gripgesturemanager.c 2011-09-22 20:00:29 +0000
@@ -87,6 +87,7 @@
87 GPtrArray *gesture_list;87 GPtrArray *gesture_list;
88 GeisInstance instance;88 GeisInstance instance;
89 GIOChannel *iochannel;89 GIOChannel *iochannel;
90 int iochannel_id;
90};91};
9192
92struct _GripRegistrationRequest93struct _GripRegistrationRequest
@@ -966,9 +967,13 @@
966 }967 }
967968
968 g_list_free (reg->bindings);969 g_list_free (reg->bindings);
970
969 g_io_channel_shutdown (reg->iochannel, FALSE, NULL);971 g_io_channel_shutdown (reg->iochannel, FALSE, NULL);
972 g_source_remove (reg->iochannel_id);
973 g_io_channel_unref (reg->iochannel);
974
970 geis_finish (reg->instance);975 geis_finish (reg->instance);
971 g_io_channel_unref(reg->iochannel);976
972 reg->instance = NULL;977 reg->instance = NULL;
973 reg->iochannel = NULL;978 reg->iochannel = NULL;
974}979}
@@ -1052,7 +1057,6 @@
1052{1057{
1053 GripGestureRegistration *reg;1058 GripGestureRegistration *reg;
1054 GeisInstance instance;1059 GeisInstance instance;
1055 GIOChannel *iochannel;
1056 gint fd = -1;1060 gint fd = -1;
1057 GeisXcbWinInfo xcb_win_info = {1061 GeisXcbWinInfo xcb_win_info = {
1058 .display_name = NULL,1062 .display_name = NULL,
@@ -1095,14 +1099,11 @@
1095 G_CALLBACK (window_destroyed_cb),1099 G_CALLBACK (window_destroyed_cb),
1096 manager);1100 manager);
10971101
1098 iochannel = g_io_channel_unix_new (fd);1102 reg->iochannel = g_io_channel_unix_new (fd);
1099 g_io_add_watch (iochannel,1103 reg->iochannel_id = g_io_add_watch (reg->iochannel,
1100 G_IO_IN,1104 G_IO_IN,
1101 io_callback,1105 io_callback,
1102 reg);1106 reg);
1103
1104 reg->iochannel = iochannel;
1105
1106 reg->gesture_list = g_ptr_array_new ();1107 reg->gesture_list = g_ptr_array_new ();
11071108
1108 return reg;1109 return reg;

Subscribers

People subscribed via source and target branches