diff options
author | Victor Kareh <[email protected]> | 2019-05-23 13:06:25 -0400 |
---|---|---|
committer | raveit65 <[email protected]> | 2019-06-16 18:12:44 +0200 |
commit | 969d85a4ed8aa5958f97649f9de11b802cf22f6c (patch) | |
tree | 9850342b02db486a12c4d96a6d8be9e294654b2b /src/core | |
parent | 09a20c0e65758a28e712aaabdf41cb2f4503269c (diff) | |
download | marco-969d85a4ed8aa5958f97649f9de11b802cf22f6c.tar.bz2 marco-969d85a4ed8aa5958f97649f9de11b802cf22f6c.tar.xz |
frames: apply shapes in different way
upstream commit:
https://gitlab.gnome.org/GNOME/metacity/commit/cd383e72
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/frame.c | 24 |
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); |