[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1059522: bookworm-pu: package caja/1.26.1-1+deb12u1



Package: release.debian.org
Severity: normal
Tags: bookworm
User: release.debian.org@packages.debian.org
Usertags: pu
X-Debbugs-Cc: caja@packages.debian.org
Control: affects -1 + src:caja

Two issue fixes have been cherry-picked from upstream to resolve caja
bugs in Debian bookworm. (The fixed bugs have not been filed against
Debian BTS, though).

[ Reason ]
(a) Graphical rendering glitches could be observed when using MATE in
remote sessions and the session window getting resized. This behaviour
also occurs on resolution changes.
(b) Wrong informal date string calculation could be observed when the
informal date format is in use.

[ Impact ]
Rejection will not be critical to end users. More a nice to have fix-up.

[ Tests ]
Manual tests.

[ Risks ]
To MATE desktop users and other caja users, in case this introduces a
regression.

[ 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_caja-desktop-window-Fix-the-xrandr-error.patch and
+      0002_Replace-deprecated-code-from-xrandr-fix.patch. Fix desktop
+      (background) rendering artifacts after resolution changes (or
+      window resizings when MATE runs in a remote session).
+    + Add 0003_caja-file-fix-yesterday-today-informal-date-bug.patch and
+      0004_caja-file-fix-future-informal-date-bug.patch. Fix usage of the
+      informal date format.

[ Other info ]
None.
diff -Nru caja-1.26.1/debian/changelog caja-1.26.1/debian/changelog
--- caja-1.26.1/debian/changelog	2022-07-23 23:32:12.000000000 +0200
+++ caja-1.26.1/debian/changelog	2023-12-27 14:44:09.000000000 +0100
@@ -1,3 +1,16 @@
+caja (1.26.1-1+deb12u1) bookworm; urgency=medium
+
+  * debian/patches:
+    + Add 0001_caja-desktop-window-Fix-the-xrandr-error.patch and
+      0002_Replace-deprecated-code-from-xrandr-fix.patch. Fix desktop
+      (background) rendering artifacts after resolution changes (or
+      window resizings when MATE runs in a remote session).
+    + Add 0003_caja-file-fix-yesterday-today-informal-date-bug.patch and
+      0004_caja-file-fix-future-informal-date-bug.patch. Fix usage of the
+      informal date format.
+
+ -- Mike Gabriel <sunweaver@debian.org>  Wed, 27 Dec 2023 14:44:09 +0100
+
 caja (1.26.1-1) unstable; urgency=medium
 
   * New upstream release.
diff -Nru caja-1.26.1/debian/patches/0001_caja-desktop-window-Fix-the-xrandr-error.patch caja-1.26.1/debian/patches/0001_caja-desktop-window-Fix-the-xrandr-error.patch
--- caja-1.26.1/debian/patches/0001_caja-desktop-window-Fix-the-xrandr-error.patch	1970-01-01 01:00:00.000000000 +0100
+++ caja-1.26.1/debian/patches/0001_caja-desktop-window-Fix-the-xrandr-error.patch	2023-12-27 13:50:53.000000000 +0100
@@ -0,0 +1,34 @@
+From e98fd06346d621d84ea1df97b018f204a9a7e641 Mon Sep 17 00:00:00 2001
+From: yangxiaojuan <yangxiaojuan@loongson.cn>
+Date: Tue, 27 Jun 2023 15:56:18 +0800
+Subject: [PATCH 1/4] caja-desktop-window: Fix the xrandr error
+
+fix https://github.com/mate-desktop/caja/issues/1096
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ src/caja-desktop-window.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c
+index 061b11b7..bb31b2c6 100644
+--- a/src/caja-desktop-window.c
++++ b/src/caja-desktop-window.c
+@@ -155,12 +155,9 @@ caja_desktop_window_screen_size_changed (GdkScreen             *screen,
+         CajaDesktopWindow *window)
+ {
+     int width_request, height_request;
+-    int scale;
+-
+-    scale = gdk_window_get_scale_factor (gdk_screen_get_root_window (screen));
+ 
+-    width_request = WidthOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
+-    height_request = HeightOfScreen (gdk_x11_screen_get_xscreen (screen)) / scale;
++    width_request = gdk_screen_get_width(screen);
++    height_request = gdk_screen_get_height(screen);
+ 
+     g_object_set (window,
+                   "width_request", width_request,
+-- 
+2.39.2
+
diff -Nru caja-1.26.1/debian/patches/0002_Replace-deprecated-code-from-xrandr-fix.patch caja-1.26.1/debian/patches/0002_Replace-deprecated-code-from-xrandr-fix.patch
--- caja-1.26.1/debian/patches/0002_Replace-deprecated-code-from-xrandr-fix.patch	1970-01-01 01:00:00.000000000 +0100
+++ caja-1.26.1/debian/patches/0002_Replace-deprecated-code-from-xrandr-fix.patch	2023-12-27 13:47:09.000000000 +0100
@@ -0,0 +1,32 @@
+From aa80005f4f2f0fe3cfbc2517213167397c1a1ce0 Mon Sep 17 00:00:00 2001
+From: lukefromdc <lukefromdc@hushmail.com>
+Date: Thu, 29 Jun 2023 08:05:44 -0400
+Subject: [PATCH 2/4] Replace deprecated code from xrandr fix
+
+*In x11 we can anchor the desktop size to the root window
+instead of the screen or (possibly multiple)monitors
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ src/caja-desktop-window.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/caja-desktop-window.c b/src/caja-desktop-window.c
+index bb31b2c6..b5f7e9a5 100644
+--- a/src/caja-desktop-window.c
++++ b/src/caja-desktop-window.c
+@@ -156,8 +156,9 @@ caja_desktop_window_screen_size_changed (GdkScreen             *screen,
+ {
+     int width_request, height_request;
+ 
+-    width_request = gdk_screen_get_width(screen);
+-    height_request = gdk_screen_get_height(screen);
++    GdkWindow *root_window;
++    root_window = gdk_screen_get_root_window (screen);
++    gdk_window_get_geometry (root_window, NULL, NULL, &width_request, &height_request);
+ 
+     g_object_set (window,
+                   "width_request", width_request,
+-- 
+2.39.2
+
diff -Nru caja-1.26.1/debian/patches/0003_caja-file-fix-yesterday-today-informal-date-bug.patch caja-1.26.1/debian/patches/0003_caja-file-fix-yesterday-today-informal-date-bug.patch
--- caja-1.26.1/debian/patches/0003_caja-file-fix-yesterday-today-informal-date-bug.patch	1970-01-01 01:00:00.000000000 +0100
+++ caja-1.26.1/debian/patches/0003_caja-file-fix-yesterday-today-informal-date-bug.patch	2023-12-27 13:47:09.000000000 +0100
@@ -0,0 +1,49 @@
+From ff7a9042077966964d898ffb66e7846bab8fec89 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20P=C3=B6schel?= <github@basicmaster.de>
+Date: Sat, 15 Apr 2023 12:42:37 +0200
+Subject: [PATCH 3/4] caja-file: fix yesterday/today informal date bug
+
+If informal date format is used, the yesterday/today ranges of 48/24
+hours apply to the end of the current day, not to the current instant.
+
+Fixes a regression introduced by 476f56a25be636970b336d525a7766b6d1eb3fff.
+Fixes #1621.
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libcaja-private/caja-file.c | 10 ++++++++--
+ 1 file changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
+index 4d4a40d4..32c3e650 100644
+--- a/libcaja-private/caja-file.c
++++ b/libcaja-private/caja-file.c
+@@ -4862,7 +4862,7 @@ caja_file_fit_date_as_string (CajaFile *file,
+ 	char *date_string;
+ 	gchar *result = NULL;
+ 	int i;
+-	GDateTime *date_time, *today;
++	GDateTime *date_time, *today, *end_of_today;
+ 	GTimeSpan file_date_age;
+ 
+ 	if (!caja_file_get_date (file, date_type, &file_time_raw)) {
+@@ -4880,9 +4880,15 @@ caja_file_fit_date_as_string (CajaFile *file,
+ 	}
+ 
+ 	today = g_date_time_new_now_local ();
+-	file_date_age = g_date_time_difference (today, date_time);
++	end_of_today = g_date_time_add_full (today, 0, 0, 1,
++					     -1 * g_date_time_get_hour (today),
++					     -1 * g_date_time_get_minute (today),
++					     -1.0 * g_date_time_get_seconds (today));
+ 	g_date_time_unref (today);
+ 
++	file_date_age = g_date_time_difference (end_of_today, date_time);
++	g_date_time_unref (end_of_today);
++
+ 	/* Format varies depending on how old the date is. This minimizes
+ 	 * the length (and thus clutter & complication) of typical dates
+ 	 * while providing sufficient detail for recent dates to make
+-- 
+2.39.2
+
diff -Nru caja-1.26.1/debian/patches/0004_caja-file-fix-future-informal-date-bug.patch caja-1.26.1/debian/patches/0004_caja-file-fix-future-informal-date-bug.patch
--- caja-1.26.1/debian/patches/0004_caja-file-fix-future-informal-date-bug.patch	1970-01-01 01:00:00.000000000 +0100
+++ caja-1.26.1/debian/patches/0004_caja-file-fix-future-informal-date-bug.patch	2023-12-27 13:47:09.000000000 +0100
@@ -0,0 +1,37 @@
+From b4267708fd0970e8d2be7833351593bc46f62b30 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Stefan=20P=C3=B6schel?= <github@basicmaster.de>
+Date: Sat, 15 Apr 2023 12:46:47 +0200
+Subject: [PATCH 4/4] caja-file: fix future informal date bug
+
+If informal date format is used, for future dates the today time format
+has been used by mistake, instead of the general time format.
+
+Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+---
+ libcaja-private/caja-file.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/libcaja-private/caja-file.c b/libcaja-private/caja-file.c
+index 32c3e650..1ebfc71e 100644
+--- a/libcaja-private/caja-file.c
++++ b/libcaja-private/caja-file.c
+@@ -4897,12 +4897,12 @@ caja_file_fit_date_as_string (CajaFile *file,
+ 	 * internationalization's sake.
+ 	 */
+ 
+-	if (file_date_age < G_TIME_SPAN_DAY) {
+-		formats = TODAY_TIME_FORMATS;
+-	} else if (file_date_age < 2 * G_TIME_SPAN_DAY) {
++	if (file_date_age <= 0 || file_date_age > 2 * G_TIME_SPAN_DAY) {
++		formats = CURRENT_WEEK_TIME_FORMATS;
++	} else if (file_date_age > G_TIME_SPAN_DAY) {
+ 		formats = YESTERDAY_TIME_FORMATS;
+ 	} else {
+-		formats = CURRENT_WEEK_TIME_FORMATS;
++		formats = TODAY_TIME_FORMATS;
+ 	}
+ 
+ 	/* Find the date format that just fits the required width. Instead of measuring
+-- 
+2.39.2
+
diff -Nru caja-1.26.1/debian/patches/series caja-1.26.1/debian/patches/series
--- caja-1.26.1/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ caja-1.26.1/debian/patches/series	2023-12-27 14:41:45.000000000 +0100
@@ -0,0 +1,4 @@
+0001_caja-desktop-window-Fix-the-xrandr-error.patch
+0002_Replace-deprecated-code-from-xrandr-fix.patch
+0003_caja-file-fix-yesterday-today-informal-date-bug.patch
+0004_caja-file-fix-future-informal-date-bug.patch

Reply to: