--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: bookworm-pu: package marco/1.26.1-3+deb12u2
- From: Mike Gabriel <sunweaver@debian.org>
- Date: Sun, 20 Aug 2023 14:12:53 +0200
- Message-id: <169253357371.906411.14380204286531470229.reportbug@sunobo>
Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: marco@packages.debian.org
Control: affects -1 + src:marco
In MATE's window manager marco an annoying issue was introduced with
marco's version in Debian bullseye (iirc). If compositing was
enabled in gsettings, there would be nice shadows around windows
on local displays, but black frames (instead of the shadows)
around windows when MATE was run in an X2Go session.
Mihai Moldovan now worked on a fix for this and we'd like to bring
his patches to marco in Debian bookworm (so the X2Go user experience
is without black shadows around windows).
As a side note: to hide (work-around) this flaw in Debian 12, the default
setting for compositing in MATE had been switched to off.
[ Reason ]
Make MATE well usable in X2Go without the need of disabling compositing
in its WM. So, local sessions can run with compositing enabled while
it gets switch to off automatically when running in a remote session
(e.g. X2Go) that does not support compositing.
[ Impact ]
When using MATE with compositing enabled, black frames around windows
appear when using MATE over X2Go.
[ Tests ]
Manual tests (local, remote MATE session).
[ Risks ]
Minimal, regressions can be possible. The patches have also already been
accepted by MATE upstream.
[ Checklist ]
[x] *all* changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in (old)stable
[x] the issue is verified as fixed in unstable
[ Changes ]
+ * 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.
-> these are the patches that fix marco in X2Go sessions...
+ * debian/:
+ + Drop black-frame-in-X2Go-sessions-workaround, re-enable compositing by
+ default again. This drops the gsettings override
+ 20_marco-debian.gschema.override.
This removes the work-around that we introduced in Debian 12. Dropping
this gsettings override reinstates marco's compositing settings as
present in Debian 11.
[ Other info ]
This change will be helpful to MATE in Debian Edu where we use X2Go for
thinclients that connect to remote sessions running MATE or Xfce. As a
side note, for Xfce we also have a patch fixing a similar issue in xfwm.
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 16:04:32.000000000 +0200
+++ marco-1.26.1/debian/20_marco-debian.gschema.override 1970-01-01 01:00:00.000000000 +0100
@@ -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 06:47:02.000000000 +0200
+++ marco-1.26.1/debian/changelog 2023-08-19 21:31:53.000000000 +0200
@@ -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 <sunweaver@debian.org> 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 16:05:14.000000000 +0200
+++ marco-1.26.1/debian/marco-common.install 2023-08-19 21:31:53.000000000 +0200
@@ -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 01:00:00.000000000 +0100
+++ marco-1.26.1/debian/patches/0001_check-availability-of-compositing-1.patch 2023-08-19 21:31:53.000000000 +0200
@@ -0,0 +1,171 @@
+From 7db333cd008d9965dacb6490120c74394d1d5590 Mon Sep 17 00:00:00 2001
+From: Mihai Moldovan <ionic@ionic.de>
+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 <X11/Xlib.h>
+ #include <X11/Xutil.h>
+ #include <glib.h>
+@@ -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 <X11/extensions/shape.h>
+@@ -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 <gdk/gdkx.h>
+ #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 01:00:00.000000000 +0100
+++ marco-1.26.1/debian/patches/0002_check-availability-of-compositing-2.patch 2023-08-19 21:31:53.000000000 +0200
@@ -0,0 +1,93 @@
+From ac2c5fbe18d4a27fa738281ef7ebfaa4a9a131f9 Mon Sep 17 00:00:00 2001
+From: Mihai Moldovan <ionic@ionic.de>
+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 <X11/Xlib.h>
+ #include <glib.h>
+ #include <gdk-pixbuf/gdk-pixbuf.h>
+@@ -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 06:45:35.000000000 +0200
+++ marco-1.26.1/debian/patches/series 2023-08-19 21:31:53.000000000 +0200
@@ -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
--- End Message ---