~mc-return/compiz/compiz.merge-fix1039406-benchmark-default-placement

« back to all changes in this revision

Viewing changes to gtk/window-decorator/gwd-settings-notified.c

Tags: v0.9.8.2
Fixes some issues that were picked up in bug #1042323

1) BUILD_METACITY=OFF not working
2) Various runtime errors using the cairo mode
3) Fixes broken borders when switching from metacity to cairo mode

Fixes (LP: #1042323). Fixes: https://bugs.launchpad.net/bugs/1042323. Approved by Sam Spilsbury.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
#include "gwd-settings-notified-interface.h"
23
23
#include "gwd-settings-notified.h"
 
24
#include "gwd-metacity-window-decoration-util.h"
24
25
 
25
26
#include "gtk-window-decorator.h"
26
27
 
119
120
    const gchar *meta_theme = NULL;
120
121
    g_object_get (settings, "metacity-theme", &meta_theme, NULL);
121
122
 
122
 
    if (meta_theme)
123
 
    {
124
 
        const gchar *theme = meta_theme;
125
 
 
126
 
        if (theme)
127
 
        {
128
 
            meta_theme_set_current (theme, TRUE);
129
 
            if (!meta_theme_get_current ())
130
 
            {
131
 
                g_warning ("specified a theme that does not exist! falling back to cairo decoration\n");
132
 
                meta_theme = NULL;
133
 
            }
134
 
        }
135
 
    }
136
 
 
137
 
    if (meta_theme)
 
123
    if (gwd_metacity_window_decoration_update_meta_theme (meta_theme,
 
124
                                                          meta_theme_get_current,
 
125
                                                          meta_theme_set_current))
138
126
    {
139
127
        theme_draw_window_decoration    = meta_draw_window_decoration;
140
128
        theme_calc_decoration_size      = meta_calc_decoration_size;
146
134
    }
147
135
    else
148
136
    {
 
137
        g_log ("gtk-window-decorator", G_LOG_LEVEL_INFO, "using cairo decoration");
149
138
        theme_draw_window_decoration    = draw_window_decoration;
150
139
        theme_calc_decoration_size      = calc_decoration_size;
151
140
        theme_update_border_extents     = update_border_extents;
172
161
static gboolean
173
162
gwd_settings_notified_impl_update_metacity_button_layout (GWDSettingsNotified *notified)
174
163
{
 
164
#ifdef USE_METACITY
175
165
    const gchar *button_layout;
176
166
    g_object_get (settings, "metacity-button-layout", &button_layout, NULL);
177
167
 
190
180
        return TRUE;
191
181
    }
192
182
 
 
183
#endif
193
184
    return FALSE;
194
185
}
195
186