summaryrefslogtreecommitdiff
path: root/src/core/frame.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/frame.c')
-rw-r--r--src/core/frame.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/core/frame.c b/src/core/frame.c
index 3c0ef935..4b0b112f 100644
--- a/src/core/frame.c
+++ b/src/core/frame.c
@@ -28,6 +28,7 @@
#include "bell.h"
#include "errors.h"
#include "keybindings.h"
+#include "prefs.h"
#ifdef HAVE_RENDER
#include <X11/extensions/Xrender.h>
@@ -42,6 +43,25 @@
FocusChangeMask | \
ColormapChangeMask)
+static gboolean update_shape (MetaFrame *frame);
+
+static void
+prefs_changed_callback (MetaPreference preference,
+ gpointer data)
+{
+ MetaFrame *frame = (MetaFrame *) data;
+
+ switch (preference)
+ {
+ case META_PREF_COMPOSITING_MANAGER:
+ frame->need_reapply_frame_shape = TRUE;
+ update_shape (frame);
+ break;
+ default:
+ break;
+ }
+}
+
void
meta_window_ensure_frame (MetaWindow *window)
{
@@ -167,6 +187,8 @@ meta_window_ensure_frame (MetaWindow *window)
frame->need_reapply_frame_shape = FALSE;
meta_display_ungrab (window->display);
+
+ meta_prefs_add_listener (prefs_changed_callback, frame);
}
void
@@ -182,6 +204,8 @@ meta_window_destroy_frame (MetaWindow *window)
frame = window->frame;
+ meta_prefs_remove_listener (prefs_changed_callback, frame);
+
meta_frame_calc_borders (frame, &borders);
meta_bell_notify_frame_destroy (frame);