From dc4a2863dd402b052edce27e441503751619b024 Mon Sep 17 00:00:00 2001 From: Mihai Moldovan Date: Fri, 28 Jul 2023 20:24:57 +0200 Subject: ui/frames: check that compositing is not only requested, but also available. Enabling code that is supposed to be used in compositing conditions is harmful if compositing is not actually available. Just checking the preference is not enough to make sure that compositing is available - the X server might be missing crucial extensions for compositing to work, which in turn correctly disables the internal compositor. The end result is graphical issues like black borders around windows in such situations. Make sure that compositing is both requested AND available to fix this bug. --- src/include/ui.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/include') diff --git a/src/include/ui.h b/src/include/ui.h index c02e78a2..9d95e37a 100644 --- a/src/include/ui.h +++ b/src/include/ui.h @@ -26,6 +26,7 @@ /* Don't include gtk.h or gdk.h here */ #include "common.h" +#include "types.h" #include #include #include @@ -91,11 +92,12 @@ void meta_ui_map_frame (MetaUI *ui, void meta_ui_unmap_frame (MetaUI *ui, Window xwindow); -void meta_ui_apply_frame_shape (MetaUI *ui, - Window xwindow, - int new_window_width, - int new_window_height, - gboolean window_has_shape); +void meta_ui_apply_frame_shape (MetaUI *ui, + MetaDisplay *display, + Window xwindow, + int new_window_width, + int new_window_height, + gboolean window_has_shape); cairo_region_t *meta_ui_get_frame_bounds (MetaUI *ui, Window xwindow, -- cgit v1.2.1