commit 3d50a8ec60f1be75a6f25433f678fc1a74f936da
Author: Vasiliy Glazov <vascom2(a)gmail.com>
Date: Wed Dec 8 00:33:34 2021 +0300
Fix autofit triggering regardless of settings.
52a7d396c846eb337ad7796fdb7163e2bc208d64.patch | 29 ++++++++++++++++++++++++++
65d0e47fcede58cb78df8e9a29ff669e2287273b.patch | 25 ++++++++++++++++++++++
celluloid.spec | 8 ++++++-
3 files changed, 61 insertions(+), 1 deletion(-)
---
diff --git a/52a7d396c846eb337ad7796fdb7163e2bc208d64.patch
b/52a7d396c846eb337ad7796fdb7163e2bc208d64.patch
new file mode 100644
index 0000000..c5f4153
--- /dev/null
+++ b/52a7d396c846eb337ad7796fdb7163e2bc208d64.patch
@@ -0,0 +1,29 @@
+From 52a7d396c846eb337ad7796fdb7163e2bc208d64 Mon Sep 17 00:00:00 2001
+From: gnome-mpv <gnome-mpv@nowhere>
+Date: Sat, 13 Nov 2021 00:39:59 +0700
+Subject: [PATCH] controller: Fix autofit triggering regardless of settings
+
+When a video is opened for the first time, the window-scale property is
+updated, triggering an autofit. Fix this by checking if window-scale is
+transitioning from the value of zero, which indicates that a video is
+being opened for the first time, and only requesting an autofit if this
+is not the case.
+
+Fixes #705.
+---
+ src/celluloid-controller.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/celluloid-controller.c b/src/celluloid-controller.c
+index d62ac1da..bfabfd1a 100644
+--- a/src/celluloid-controller.c
++++ b/src/celluloid-controller.c
+@@ -920,7 +920,7 @@ window_scale_handler(GObject *object, GParamSpec *pspec, gpointer
data)
+ window_scale = MIN( width/(gdouble)video_width,
+ height/(gdouble)video_height );
+
+- if(ABS(window_scale-new_window_scale) > 0.0001)
++ if(window_scale > 0.0 && ABS(window_scale-new_window_scale) > 0.0001)
+ {
+ celluloid_controller_autofit(data, new_window_scale);
+ }
diff --git a/65d0e47fcede58cb78df8e9a29ff669e2287273b.patch
b/65d0e47fcede58cb78df8e9a29ff669e2287273b.patch
new file mode 100644
index 0000000..0ead188
--- /dev/null
+++ b/65d0e47fcede58cb78df8e9a29ff669e2287273b.patch
@@ -0,0 +1,25 @@
+From 65d0e47fcede58cb78df8e9a29ff669e2287273b Mon Sep 17 00:00:00 2001
+From: gnome-mpv <gnome-mpv@nowhere>
+Date: Sun, 21 Nov 2021 17:54:34 +0700
+Subject: [PATCH] main-window: Fix window size shrinking across sessions
+
+Fixes #713.
+---
+ src/celluloid-main-window.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/celluloid-main-window.c b/src/celluloid-main-window.c
+index e96b50f3..6af84749 100644
+--- a/src/celluloid-main-window.c
++++ b/src/celluloid-main-window.c
+@@ -576,8 +576,8 @@ celluloid_main_window_save_state(CelluloidMainWindow *wnd)
+
+ if(!maximized)
+ {
+- g_settings_set_int(settings, "width", width - 52);
+- g_settings_set_int(settings, "height", height - 52);
++ g_settings_set_int(settings, "width", width);
++ g_settings_set_int(settings, "height", height);
+ }
+
+ if(celluloid_main_window_get_playlist_visible(wnd))
diff --git a/celluloid.spec b/celluloid.spec
index e6c8408..be1c893 100644
--- a/celluloid.spec
+++ b/celluloid.spec
@@ -1,11 +1,14 @@
Name: celluloid
Version: 0.22
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A simple GTK+ frontend for mpv
License: GPLv3+
URL:
https://github.com/celluloid-player/celluloid
Source0: %{url}/releases/download/v%{version}/%{name}-%{version}.tar.xz
+# Fix autofit triggering regardless of settings
+Patch0: 65d0e47fcede58cb78df8e9a29ff669e2287273b.patch
+Patch1: 52a7d396c846eb337ad7796fdb7163e2bc208d64.patch
BuildRequires: gcc
BuildRequires: desktop-file-utils
@@ -56,6 +59,9 @@ desktop-file-validate
%{buildroot}%{_datadir}/applications/io.github.celluloid_p
%{_mandir}/man1/%{name}.1.*
%changelog
+* Wed Dec 08 2021 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.22-3
+- Fix autofit triggering regardless of settings
+
* Tue Nov 16 2021 Vasiliy N. Glazov <vascom2(a)gmail.com> - 0.22-2
- Switch to yt-dlp