Merge lp:~smspillaz/compiz-core/compiz-core.fix_953839 into lp:compiz-core

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 3063
Proposed branch: lp:~smspillaz/compiz-core/compiz-core.fix_953839
Merge into: lp:compiz-core
Diff against target: 28 lines (+11/-4)
1 file modified
gtk/window-decorator/settings.c (+11/-4)
To merge this branch: bzr merge lp:~smspillaz/compiz-core/compiz-core.fix_953839
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Tim Penhey (community) Approve
Review via email: mp+98319@code.launchpad.net

Description of the change

  Use gconf_client_dir_exists as gconf_client_get_* doesn't set GError if
  the dir doesn't exit in the gconf database.

  Fixes LP#953839

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Looks fine to me.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Looks OK and works OK. Though my compiz-core test environment doesn't exhibit the bug so I can't verify it totally.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'gtk/window-decorator/settings.c'
2--- gtk/window-decorator/settings.c 2012-02-20 12:34:50 +0000
3+++ gtk/window-decorator/settings.c 2012-03-20 01:21:17 +0000
4@@ -148,13 +148,20 @@
5 mutter_draggable_border_width_changed (GConfClient *client)
6 {
7 static const unsigned int default_draggable_border_width = 7;
8- int new_width;
9+ int new_width = default_draggable_border_width;
10 int width = settings->mutter_draggable_border_width;
11 GError *error = NULL;
12
13- new_width = gconf_client_get_int (client,
14- MUTTER_DRAGGABLE_BORDER_WIDTH_KEY,
15- &error);
16+ if (gconf_client_dir_exists (client,
17+ MUTTER_GCONF_DIR,
18+ &error))
19+ {
20+ if (!error)
21+ new_width = gconf_client_get_int (client,
22+ MUTTER_DRAGGABLE_BORDER_WIDTH_KEY,
23+ &error);
24+ }
25+
26 if (error)
27 {
28 new_width = default_draggable_border_width;

Subscribers

People subscribed via source and target branches