Package: release.debian.org
Severity: normal
User: release.debian....@packages.debian.org
Usertags: unblock

Please unblock package marco

Various issues have been fixed in 1.26.1-3:

+  * Revert "debian/control: Drop B-D: libxpresent-dev." introduced with
+    marco 1.26.0-2.
+    The underlying cause of the problem (see Launchpad issue #1960621) has
+    long been solved in X.org's present extension. (This really closes:
+    #1034605).

-> This fixes screen tearing if default compositor is on.

+ -- Mike Gabriel <sunwea...@debian.org>  Wed, 26 Apr 2023 07:46:12 +0200
+
+marco (1.26.1-2) unstable; urgency=medium
+
+  * debian/patches:
+    + Add patches 0001, 0002 and 0003. Fixes marco crashing when run in an X2Go
+      session. (Closes: #1034677).

-> This fixes launching MATE desktop sessions via X2Go. Without the above
named patches marco will crash when run inside an X2Go remote desktop
session.

+  * debian/{marco-common.install,20_marco-debian.gschema.override}:
+    + Disable compositing manager in marco, hides dark border around windows in
+      X2Go. (Closes: #982879). This also works around screen tearing in MATE
+      desktop when installing MATE in Debian with default settings. (Closes:
+      #1034605).

-> When run in X2Go (where the underlying Xserver lacks the composite
extension) all windows will have a thick black border. As marco is not bright 
enough
to differentiate between a local Xsession and a remote Xsession the best 
workaround
is disabling the Compositor by default in marco's gsettings.

[ Reason ]
MATE desktop is an ideal environment for remote desktop (such as X2Go).
This should stay supported in Debian 12 (as it used to be in Debian 10
and 11).

[ Impact ]
Big improvement for Debian's X2Go users.

[ Tests ]
Manually.

[ Risks ]
For MATE users on local desktop, upgrading to marco 1.26.1-3 will disable
the Compositor. It can be re-enabled via the MATE control center.

[ 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 testing

[ Other info ]
None.

unblock marco/1.26.1-3
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        1970-01-01 
01:00:00.000000000 +0100
+++ marco-1.26.1/debian/20_marco-debian.gschema.override        2023-04-25 
16:04:32.000000000 +0200
@@ -0,0 +1,2 @@
+[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       2022-11-13 21:28:36.000000000 +0100
+++ marco-1.26.1/debian/changelog       2023-04-26 07:46:12.000000000 +0200
@@ -1,3 +1,26 @@
+marco (1.26.1-3) unstable; urgency=medium
+
+  * Revert "debian/control: Drop B-D: libxpresent-dev." introduced with
+    marco 1.26.0-2.
+    The underlying cause of the problem (see Launchpad issue #1960621) has
+    long been solved in X.org's present extension. (This really closes:
+    #1034605).
+
+ -- Mike Gabriel <sunwea...@debian.org>  Wed, 26 Apr 2023 07:46:12 +0200
+
+marco (1.26.1-2) unstable; urgency=medium
+
+  * debian/patches:
+    + Add patches 0001, 0002 and 0003. Fixes marco crashing when run in an X2Go
+      session. (Closes: #1034677).
+  * debian/{marco-common.install,20_marco-debian.gschema.override}:
+    + Disable compositing manager in marco, hides dark border around windows in
+      X2Go. (Closes: #982879). This also works around screen tearing in MATE
+      desktop when installing MATE in Debian with default settings. (Closes:
+      #1034605).
+
+ -- Mike Gabriel <sunwea...@debian.org>  Tue, 25 Apr 2023 15:49:34 +0200
+
 marco (1.26.1-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru marco-1.26.1/debian/control marco-1.26.1/debian/control
--- marco-1.26.1/debian/control 2022-11-13 21:13:14.000000000 +0100
+++ marco-1.26.1/debian/control 2023-04-26 07:46:04.000000000 +0200
@@ -25,6 +25,7 @@
                libxext-dev,
                libxfixes-dev,
                libxinerama-dev,
+               libxpresent-dev,
                libxrandr-dev,
                libxrender-dev,
                libxres-dev,
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    2016-02-07 12:15:35.000000000 
+0100
+++ marco-1.26.1/debian/marco-common.install    2023-04-25 16:05:14.000000000 
+0200
@@ -5,3 +5,4 @@
 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_test-retval-from-XResQueryClientIds.patch 
marco-1.26.1/debian/patches/0001_test-retval-from-XResQueryClientIds.patch
--- marco-1.26.1/debian/patches/0001_test-retval-from-XResQueryClientIds.patch  
1970-01-01 01:00:00.000000000 +0100
+++ marco-1.26.1/debian/patches/0001_test-retval-from-XResQueryClientIds.patch  
2023-04-25 15:33:20.000000000 +0200
@@ -0,0 +1,31 @@
+From 9c8e9564d2f5ed27175c0a6061394c25889dfb31 Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <joakim.tjernl...@infinera.com>
+Date: Mon, 19 Dec 2022 16:58:10 +0100
+Subject: [PATCH] test return value from XResQueryClientIds()
+
+---
+ src/core/window-props.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/src/core/window-props.c b/src/core/window-props.c
+index 3414a3d9a..b27809ab4 100644
+--- a/src/core/window-props.c
++++ b/src/core/window-props.c
+@@ -309,11 +309,12 @@ get_local_pid (MetaWindow *window)
+   spec.client = window->xwindow;
+   spec.mask = XRES_CLIENT_ID_PID_MASK;
+ 
+-  XResQueryClientIds (window->display->xdisplay,
+-                      1,
+-                      &spec,
+-                      &num_ids,
+-                      &client_ids);
++  if (!XResQueryClientIds (window->display->xdisplay,
++                          1,
++                          &spec,
++                          &num_ids,
++                          &client_ids))
++      return pid;
+ 
+   for (i = 0; i < num_ids; i++)
+     {
diff -Nru marco-1.26.1/debian/patches/0002_test-xres-1.2-is-present.patch 
marco-1.26.1/debian/patches/0002_test-xres-1.2-is-present.patch
--- marco-1.26.1/debian/patches/0002_test-xres-1.2-is-present.patch     
1970-01-01 01:00:00.000000000 +0100
+++ marco-1.26.1/debian/patches/0002_test-xres-1.2-is-present.patch     
2023-04-25 15:57:19.000000000 +0200
@@ -0,0 +1,73 @@
+From 066888715066fbc4625612c8738c32b66666ceee Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <joakim.tjernl...@infinera.com>
+Date: Mon, 19 Dec 2022 16:59:06 +0100
+Subject: [PATCH] Test Xres 1.2 is present
+
+Before using any Xres extension one must call XResQueryExtension()
+Also make sure Xres 1.2 is available as marco need XResQueryClientIds()
+---
+ src/core/display-private.h |  1 +
+ src/core/display.c         | 14 ++++++++++++--
+ 2 files changed, 13 insertions(+), 2 deletions(-)
+
+--- a/src/core/display-private.h
++++ b/src/core/display-private.h
+@@ -80,6 +80,7 @@
+ struct _MetaDisplay {
+       char* name;
+       Display* xdisplay;
++      gboolean have_xres; /* Got XRES >= 1.2 */
+ 
+       Window leader_window;
+       Window timestamp_pinging_window;
+--- a/src/core/display.c
++++ b/src/core/display.c
+@@ -50,6 +50,7 @@
+ #include "compositor.h"
+ #include <X11/Xatom.h>
+ #include <X11/cursorfont.h>
++#include <X11/extensions/XRes.h>
+ 
+ #ifdef HAVE_SOLARIS_XINERAMA
+       #include <X11/extensions/xinerama.h>
+@@ -329,7 +330,8 @@
+   Display *xdisplay;
+   GSList *screens;
+   GSList *tmp;
+-  int i;
++  int i, event_base, error_base, major, minor;
++  gboolean have_xres = FALSE;
+   guint32 timestamp;
+ 
+   /* A list of all atom names, so that we can intern them in one go. */
+@@ -343,6 +345,7 @@
+   meta_verbose ("Opening display '%s'\n", XDisplayName (NULL));
+ 
+   xdisplay = meta_ui_get_display ();
++  event_base = error_base = major = minor = 0;
+ 
+   if (xdisplay == NULL)
+     {
+@@ -350,7 +353,13 @@
+                   XDisplayName (NULL));
+       return FALSE;
+     }
+-
++  /* Make sure to init Xres any extensions */
++  if (XResQueryExtension(xdisplay, &event_base, &error_base) &&
++      XResQueryVersion (xdisplay, &major, &minor) == 1)
++    {
++      if (major > 1 || (major == 1 && minor >= 2))
++          have_xres = TRUE;
++    }
+   if (meta_is_syncing ())
+     XSynchronize (xdisplay, True);
+ 
+@@ -365,6 +374,7 @@
+    */
+   the_display->name = g_strdup (XDisplayName (NULL));
+   the_display->xdisplay = xdisplay;
++  the_display->have_xres = have_xres;
+   the_display->error_trap_synced_at_last_pop = TRUE;
+   the_display->error_traps = 0;
+   the_display->error_trap_handler = NULL;
diff -Nru 
marco-1.26.1/debian/patches/0003_test-if-XResQueryClientIds-is-available.patch 
marco-1.26.1/debian/patches/0003_test-if-XResQueryClientIds-is-available.patch
--- 
marco-1.26.1/debian/patches/0003_test-if-XResQueryClientIds-is-available.patch  
    1970-01-01 01:00:00.000000000 +0100
+++ 
marco-1.26.1/debian/patches/0003_test-if-XResQueryClientIds-is-available.patch  
    2023-04-25 15:34:38.000000000 +0200
@@ -0,0 +1,23 @@
+From 6cc8a2ff1e80d55d8edd7cd9c605bd068e83a72b Mon Sep 17 00:00:00 2001
+From: Joakim Tjernlund <joakim.tjernl...@infinera.com>
+Date: Thu, 29 Dec 2022 14:51:57 +0100
+Subject: [PATCH] Test if XResQueryClientIds() is available before using it.
+
+Needed for X2Go as it does not have XRES 1.2 extension.
+---
+ src/core/window-props.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/core/window-props.c b/src/core/window-props.c
+index b27809ab4..06df9e660 100644
+--- a/src/core/window-props.c
++++ b/src/core/window-props.c
+@@ -305,6 +305,8 @@ get_local_pid (MetaWindow *window)
+   long i;
+ 
+   pid = -1;
++  if (window->display->have_xres == FALSE)
++    return pid;
+ 
+   spec.client = window->xwindow;
+   spec.mask = XRES_CLIENT_ID_PID_MASK;
diff -Nru marco-1.26.1/debian/patches/series marco-1.26.1/debian/patches/series
--- marco-1.26.1/debian/patches/series  2022-11-13 21:08:12.000000000 +0100
+++ marco-1.26.1/debian/patches/series  2023-04-25 15:34:49.000000000 +0200
@@ -1,3 +1,6 @@
 
 0000_shadows.patch
 1001_marco-Add-cmdline-option-no-keybindings-for-disablin.patch
+0001_test-retval-from-XResQueryClientIds.patch
+0002_test-xres-1.2-is-present.patch
+0003_test-if-XResQueryClientIds-is-available.patch

Reply via email to