diff options
author | Victor Kareh <[email protected]> | 2019-05-23 13:06:25 -0400 |
---|---|---|
committer | Victor Kareh <[email protected]> | 2019-06-05 10:49:37 -0400 |
commit | b52aff0da9140a03159bf8da83e45da3baad7fc1 (patch) | |
tree | 6eeae4af6b7ef83f55c121eba85829865710f0d7 /src/core | |
parent | 9b3afacfed0689ed36c7c10d00ca7873da3d0bb8 (diff) | |
download | marco-b52aff0da9140a03159bf8da83e45da3baad7fc1.tar.bz2 marco-b52aff0da9140a03159bf8da83e45da3baad7fc1.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); |