Skip to content

Commit 4785c9e

Browse files
committedApr 22, 2025
Add upstream fix for session handling
1 parent b391267 commit 4785c9e

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed
 
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 6032b78512685dc7d6cc3754d536823d428525c4 Mon Sep 17 00:00:00 2001
2+
From: Felix Ernst <felixernst@zohomail.eu>
3+
Date: Wed, 16 Apr 2025 13:50:05 +0000
4+
Subject: [PATCH] Fix session restore
5+
6+
Since https://commits.kde.org/kxmlgui/8c9fb02a1d37672b26a03a9dd9e8675743deb269
7+
KXmlGui only triggers a session restore for a window when the
8+
session config contains a "NumberOfWindows" key with a value >= 1.
9+
This commit adds such a key to the Dolphin session config, which
10+
fixes the Dolphin main window restore for KXmlGui versions
11+
containing that commit.
12+
13+
BUG: 502770
14+
15+
16+
(cherry picked from commit c0bf226aa1cc02c9bffff1ec05e07a255d8d2f6e)
17+
18+
Co-authored-by: Felix Ernst <felixernst@zohomail.eu>
19+
---
20+
src/dolphinmainwindow.cpp | 2 ++
21+
1 file changed, 2 insertions(+)
22+
23+
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
24+
index 8a6c99ce57..391fe81a8c 100644
25+
--- a/src/dolphinmainwindow.cpp
26+
+++ b/src/dolphinmainwindow.cpp
27+
@@ -757,6 +757,8 @@ void DolphinMainWindow::slotSaveSession()
28+
KConfig *config = KConfigGui::sessionConfig();
29+
saveGlobalProperties(config);
30+
savePropertiesInternal(config, 1);
31+
+ KConfigGroup group = config->group(QStringLiteral("Number"));
32+
+ group.writeEntry("NumberOfWindows", 1); // Makes session restore aware that there is a window to restore.
33+
34+
auto future = QtConcurrent::run([config]() {
35+
config->sync();
36+
--
37+
GitLab
38+

‎plasma6-dolphin.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Summary: File manager for KDE focusing on usability
77
Name: plasma6-dolphin
88
Version: 25.04.0
9-
Release: %{?git:0.%{git}.}1
9+
Release: %{?git:0.%{git}.}2
1010
License: GPLv2+
1111
Group: Graphical desktop/KDE
1212
%if 0%{?git:1}
@@ -65,6 +65,8 @@ dolphin-21.03.80-show-copyto-moveto-by-default.patch
6565
# Revert https://invent.kde.org/system/dolphin/-/commit/122fee5625f0285ec4ebda79162c72390989eb2a.patch
6666
# It makes the UI less consistent for the sake of making it idiot friendly. This isn't GNOME.
6767
revert-122fee5625f0285ec4ebda79162c72390989eb2a.patch
68+
# https://bugs.kde.org/show_bug.cgi?id=502770
69+
https://invent.kde.org/system/dolphin/-/commit/6032b78512685dc7d6cc3754d536823d428525c4.patch
6870

6971
%description
7072
Dolphin is a file manager for KDE focusing on usability.

0 commit comments

Comments
 (0)
Please sign in to comment.