Merge lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214 into lp:compiz-compizconfig-gconf

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: 161
Merged at revision: 161
Proposed branch: lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214
Merge into: lp:compiz-compizconfig-gconf
Diff against target: 27 lines (+9/-2)
1 file modified
src/gconf.c (+9/-2)
To merge this branch: bzr merge lp:~alan-griffiths/compiz-compizconfig-gconf/Bug-953214
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Review via email: mp+97685@code.launchpad.net

Description of the change

Seems to fix lp:953214

I'm not too sure about this API - so I hope someone who understands gtk can review. But I've seen no ill-effects and no more SEG faults.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks quite sane.

review: Approve
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

g_main_loop_is_running(NULL) looks odd to me. The code for that function is:

gboolean
g_main_loop_is_running (GMainLoop *loop)
{
  g_return_val_if_fail (loop != NULL, FALSE);
  g_return_val_if_fail (g_atomic_int_get (&loop->ref_count) > 0, FALSE);

  return loop->is_running;
}

So this statement always returns FALSE. So you've effectively just removed the processEvents(0) call.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gconf.c'
2--- src/gconf.c 2011-09-09 09:33:52 +0000
3+++ src/gconf.c 2012-03-15 16:04:24 +0000
4@@ -1958,7 +1958,11 @@
5 static Bool
6 finiBackend (CCSContext * context)
7 {
8- processEvents (0);
9+
10+ if (g_main_loop_is_running(NULL))
11+ {
12+ processEvents (0);
13+ }
14
15 gconf_client_clear_cache (client);
16 finiClient ();
17@@ -1972,7 +1976,10 @@
18 gconf_engine_unref (conf);
19 conf = NULL;
20
21- processEvents (0);
22+ if (g_main_loop_is_running(NULL))
23+ {
24+ processEvents (0);
25+ }
26 return TRUE;
27 }
28

Subscribers

People subscribed via source and target branches