Version in base suite: 1.26.1-3+deb12u1 Base version: marco_1.26.1-3+deb12u1 Target version: marco_1.26.1-3+deb12u2 Base file: /srv/ftp-master.debian.org/ftp/pool/main/m/marco/marco_1.26.1-3+deb12u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/m/marco/marco_1.26.1-3+deb12u2.dsc 20_marco-debian.gschema.override | 2 changelog | 28 ++ marco-common.install | 1 patches/0001_check-availability-of-compositing-1.patch | 171 +++++++++++++++++ patches/0002_check-availability-of-compositing-2.patch | 93 +++++++++ patches/series | 2 6 files changed, 294 insertions(+), 3 deletions(-) diff -Nru marco-1.26.1/debian/20_marco-debian.gschema.override marco-1.26.1/debian/20_marco-debian.gschema.override --- marco-1.26.1/debian/20_marco-debian.gschema.override 2023-04-25 14:04:32.000000000 +0000 +++ marco-1.26.1/debian/20_marco-debian.gschema.override 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -[org.mate.Marco.general] -compositing-manager=false diff -Nru marco-1.26.1/debian/changelog marco-1.26.1/debian/changelog --- marco-1.26.1/debian/changelog 2023-07-10 04:47:02.000000000 +0000 +++ marco-1.26.1/debian/changelog 2023-08-19 19:31:53.000000000 +0000 @@ -1,3 +1,31 @@ +marco (1.26.1-3+deb12u2) bookworm; urgency=medium + + * debian/patches: + + Add 0001_check-availability-of-compositing-1.patch and + 0002_check-availability-of-compositing-2.patch. 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. + + This resolves an annoying issue when running MATE desktop in X2Go + sessions with the x2goagent (nx-libs) Xserver backend. + * debian/: + + Drop black-frame-in-X2Go-sessions-workaround, re-enable compositing by + default again. This drops the gsettings override + 20_marco-debian.gschema.override. + + -- Mike Gabriel Sat, 19 Aug 2023 21:31:53 +0200 + marco (1.26.1-3+deb12u1) bookworm; urgency=medium * debian/patches: diff -Nru marco-1.26.1/debian/marco-common.install marco-1.26.1/debian/marco-common.install --- marco-1.26.1/debian/marco-common.install 2023-04-25 14:05:14.000000000 +0000 +++ marco-1.26.1/debian/marco-common.install 2023-08-19 19:31:53.000000000 +0000 @@ -5,4 +5,3 @@ usr/share/mate-control-center/ usr/share/mate/ usr/share/themes/ -debian/20_marco-debian.gschema.override usr/share/glib-2.0/schemas/ diff -Nru marco-1.26.1/debian/patches/0001_check-availability-of-compositing-1.patch marco-1.26.1/debian/patches/0001_check-availability-of-compositing-1.patch --- marco-1.26.1/debian/patches/0001_check-availability-of-compositing-1.patch 1970-01-01 00:00:00.000000000 +0000 +++ marco-1.26.1/debian/patches/0001_check-availability-of-compositing-1.patch 2023-08-19 19:31:53.000000000 +0000 @@ -0,0 +1,171 @@ +From 7db333cd008d9965dacb6490120c74394d1d5590 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Fri, 28 Jul 2023 20:24:57 +0200 +Subject: [PATCH] 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/core/frame.c | 2 ++ + src/include/ui.h | 12 +++++++----- + src/ui/frames.c | 16 ++++++++++------ + src/ui/frames.h | 12 +++++++----- + src/ui/ui.c | 13 +++++++------ + 5 files changed, 33 insertions(+), 22 deletions(-) + +diff --git a/src/core/frame.c b/src/core/frame.c +index 957f6c762..e1eec2a40 100644 +--- a/src/core/frame.c ++++ b/src/core/frame.c +@@ -152,6 +152,7 @@ meta_window_ensure_frame (MetaWindow *window) + + /* Shape mask */ + meta_ui_apply_frame_shape (frame->window->screen->ui, ++ frame->window->display, + frame->xwindow, + frame->rect.width, + frame->rect.height, +@@ -325,6 +326,7 @@ update_shape (MetaFrame *frame) + if (frame->need_reapply_frame_shape) + { + meta_ui_apply_frame_shape (frame->window->screen->ui, ++ frame->window->display, + frame->xwindow, + frame->rect.width, + frame->rect.height, +diff --git a/src/include/ui.h b/src/include/ui.h +index c02e78a21..9d95e37af 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, +diff --git a/src/ui/frames.c b/src/ui/frames.c +index d65dac82d..ad7e10c8f 100644 +--- a/src/ui/frames.c ++++ b/src/ui/frames.c +@@ -37,6 +37,7 @@ + #include "theme.h" + #include "prefs.h" + #include "ui.h" ++#include "display.h" + + #ifdef HAVE_SHAPE + #include +@@ -1063,11 +1064,12 @@ get_frame_region (int window_width, + #endif /* HAVE_SHAPE */ + + void +-meta_frames_apply_shapes (MetaFrames *frames, +- Window xwindow, +- int new_window_width, +- int new_window_height, +- gboolean window_has_shape) ++meta_frames_apply_shapes (MetaFrames *frames, ++ MetaDisplay *meta_display, ++ Window xwindow, ++ int new_window_width, ++ int new_window_height, ++ gboolean window_has_shape) + { + #ifdef HAVE_SHAPE + /* Apply shapes as if window had new_window_width, new_window_height */ +@@ -1095,7 +1097,9 @@ meta_frames_apply_shapes (MetaFrames *frames, + + meta_frames_calc_geometry (frames, frame, &fgeom); + +- compositing_manager = meta_prefs_get_compositing_manager (); ++ compositing_manager = meta_prefs_get_compositing_manager () && ++ meta_display && ++ !!(meta_display_get_compositor (meta_display)); + + if (!window_has_shape && compositing_manager) + return; +diff --git a/src/ui/frames.h b/src/ui/frames.h +index ad86ee44f..f4821e435 100644 +--- a/src/ui/frames.h ++++ b/src/ui/frames.h +@@ -28,6 +28,7 @@ + #include + #include "common.h" + #include "theme.h" ++#include "types.h" + + typedef enum + { +@@ -135,11 +136,12 @@ void meta_frames_get_borders (MetaFrames *frames, + Window xwindow, + MetaFrameBorders *borders); + +-void meta_frames_apply_shapes (MetaFrames *frames, +- Window xwindow, +- int new_window_width, +- int new_window_height, +- gboolean window_has_shape); ++void meta_frames_apply_shapes (MetaFrames *frames, ++ MetaDisplay *meta_display, ++ Window xwindow, ++ int new_window_width, ++ int new_window_height, ++ gboolean window_has_shape); + cairo_region_t *meta_frames_get_frame_bounds (MetaFrames *frames, + Window xwindow, + int window_width, +diff --git a/src/ui/ui.c b/src/ui/ui.c +index 9976c7014..2b15cc82d 100644 +--- a/src/ui/ui.c ++++ b/src/ui/ui.c +@@ -458,13 +458,14 @@ meta_ui_repaint_frame (MetaUI *ui, + } + + void +-meta_ui_apply_frame_shape (MetaUI *ui, +- Window xwindow, +- int new_window_width, +- int new_window_height, +- gboolean window_has_shape) ++meta_ui_apply_frame_shape (MetaUI *ui, ++ MetaDisplay *display, ++ Window xwindow, ++ int new_window_width, ++ int new_window_height, ++ gboolean window_has_shape) + { +- meta_frames_apply_shapes (ui->frames, xwindow, ++ meta_frames_apply_shapes (ui->frames, display, xwindow, + new_window_width, new_window_height, + window_has_shape); + } diff -Nru marco-1.26.1/debian/patches/0002_check-availability-of-compositing-2.patch marco-1.26.1/debian/patches/0002_check-availability-of-compositing-2.patch --- marco-1.26.1/debian/patches/0002_check-availability-of-compositing-2.patch 1970-01-01 00:00:00.000000000 +0000 +++ marco-1.26.1/debian/patches/0002_check-availability-of-compositing-2.patch 2023-08-19 19:31:53.000000000 +0000 @@ -0,0 +1,93 @@ +From ac2c5fbe18d4a27fa738281ef7ebfaa4a9a131f9 Mon Sep 17 00:00:00 2001 +From: Mihai Moldovan +Date: Fri, 28 Jul 2023 20:27:28 +0200 +Subject: [PATCH] ui/tabpopup: likewise only enable compositing code if + available. + +--- + src/core/screen.c | 2 ++ + src/include/tabpopup.h | 2 ++ + src/ui/tabpopup.c | 9 +++++++-- + 3 files changed, 11 insertions(+), 2 deletions(-) + +--- a/src/core/screen.c ++++ b/src/core/screen.c +@@ -1406,6 +1406,7 @@ + } + + screen->tab_popup = meta_ui_tab_popup_new (entries, ++ screen, + len, + meta_prefs_get_alt_tab_max_columns(), + meta_prefs_get_alt_tab_expand_to_fit_title(), +@@ -1485,6 +1486,7 @@ + } + + screen->tab_popup = meta_ui_tab_popup_new (entries, ++ screen, + len, + layout.cols, + FALSE, /* expand_for_titles */ +--- a/src/include/tabpopup.h ++++ b/src/include/tabpopup.h +@@ -28,6 +28,7 @@ + /* Don't include gtk.h or gdk.h here */ + #include "common.h" + #include "boxes.h" ++#include "types.h" + #include + #include + #include +@@ -58,6 +59,7 @@ + }; + + MetaTabPopup* meta_ui_tab_popup_new (const MetaTabEntry *entries, ++ MetaScreen *meta_screen, + int entry_count, + int width, + gboolean expand_for_titles, +--- a/src/ui/tabpopup.c ++++ b/src/ui/tabpopup.c +@@ -30,6 +30,7 @@ + #include "tabpopup.h" + #include "theme.h" + #include "prefs.h" ++#include "screen.h" + /* FIXME these two includes are 100% broken... */ + #include "../core/workspace.h" + #include "../core/frame-private.h" +@@ -235,6 +236,7 @@ + + MetaTabPopup* + meta_ui_tab_popup_new (const MetaTabEntry *entries, ++ MetaScreen *meta_screen, + int entry_count, + int width, + gboolean expand_for_titles, +@@ -285,7 +287,8 @@ + gtk_window_set_resizable (GTK_WINDOW (popup->window), TRUE); + + /* This style should only be set for composited mode. */ +- if (meta_prefs_get_compositing_manager ()) ++ if (meta_prefs_get_compositing_manager () && meta_screen && ++ !!(meta_display_get_compositor (meta_screen_get_display (meta_screen)))) + { + frame_shadow = GTK_SHADOW_NONE; + gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (popup->window)), +@@ -1117,13 +1120,15 @@ + { + GtkStyleContext *context; + GdkRGBA color; ++ MetaScreen *screen = META_SELECT_WORKSPACE (widget)->workspace->screen; + + context = gtk_widget_get_style_context (widget); + + gtk_style_context_set_state (context, + gtk_widget_get_state_flags (widget)); + +- if (meta_prefs_get_compositing_manager ()) ++ if (meta_prefs_get_compositing_manager () && screen && ++ !!(meta_display_get_compositor (meta_screen_get_display (screen)))) + { + /* compositing manager creates a dark background: show the selection in a light color */ + meta_gtk_style_get_light_color (context, GTK_STATE_FLAG_SELECTED, &color); diff -Nru marco-1.26.1/debian/patches/series marco-1.26.1/debian/patches/series --- marco-1.26.1/debian/patches/series 2023-07-10 04:45:35.000000000 +0000 +++ marco-1.26.1/debian/patches/series 2023-08-19 19:31:53.000000000 +0000 @@ -4,3 +4,5 @@ 0002_test-xres-1.2-is-present.patch 0003_test-if-XResQueryClientIds-is-available.patch 0004_show-correct-window-title-when-owned-by-superuser.patch +0001_check-availability-of-compositing-1.patch +0002_check-availability-of-compositing-2.patch