Fixed issue with system shutdown on KDE Plasma.
This commit is contained in:
parent
fdfb26f985
commit
f39a967727
52
nheko-fix-quit.patch
Normal file
52
nheko-fix-quit.patch
Normal file
@ -0,0 +1,52 @@
|
||||
From 363e3735f13fb5d2f03078bfc7146dd0487bd6ce Mon Sep 17 00:00:00 2001
|
||||
From: Konstantinos Sideris <sideris.konstantin@gmail.com>
|
||||
Date: Wed, 11 Jul 2018 20:55:13 +0300
|
||||
Subject: [PATCH] Allow close events from the session manager (#353)
|
||||
|
||||
---
|
||||
include/MainWindow.h | 2 ++
|
||||
src/MainWindow.cc | 14 +++++++++-----
|
||||
2 files changed, 11 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include/MainWindow.h b/include/MainWindow.h
|
||||
index 3840bd9..9204019 100644
|
||||
--- a/include/MainWindow.h
|
||||
+++ b/include/MainWindow.h
|
||||
@@ -119,6 +119,8 @@ private slots:
|
||||
void restoreWindowSize();
|
||||
//! Check if there is an open dialog.
|
||||
bool hasActiveDialogs() const;
|
||||
+ //! Check if the current page supports the "minimize to tray" functionality.
|
||||
+ bool pageSupportsTray() const;
|
||||
|
||||
static MainWindow *instance_;
|
||||
|
||||
diff --git a/src/MainWindow.cc b/src/MainWindow.cc
|
||||
index 37739dc..37b806d 100644
|
||||
--- a/src/MainWindow.cc
|
||||
+++ b/src/MainWindow.cc
|
||||
@@ -277,11 +277,8 @@ MainWindow::showChatPage()
|
||||
void
|
||||
MainWindow::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
- // Decide whether or not we should enable tray for the current page.
|
||||
- bool pageSupportsTray =
|
||||
- !welcome_page_->isVisible() && !login_page_->isVisible() && !register_page_->isVisible();
|
||||
-
|
||||
- if (isVisible() && pageSupportsTray && userSettings_->isTrayEnabled()) {
|
||||
+ if (!qApp->isSavingSession() && isVisible() && pageSupportsTray() &&
|
||||
+ userSettings_->isTrayEnabled()) {
|
||||
event->ignore();
|
||||
hide();
|
||||
}
|
||||
@@ -505,3 +502,10 @@ MainWindow::hasActiveDialogs() const
|
||||
(!createRoomModal_.isNull() && createRoomModal_->isVisible()) ||
|
||||
(!logoutModal_.isNull() && logoutModal_->isVisible());
|
||||
}
|
||||
+
|
||||
+bool
|
||||
+MainWindow::pageSupportsTray() const
|
||||
+{
|
||||
+ return !welcome_page_->isVisible() && !login_page_->isVisible() &&
|
||||
+ !register_page_->isVisible();
|
||||
+}
|
@ -21,7 +21,7 @@
|
||||
Summary: Desktop client for the Matrix protocol
|
||||
Name: nheko
|
||||
Version: 0.4.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
# Application and 3rd-party modules licensing:
|
||||
# * S0 - GPLv3+ -- main source;
|
||||
@ -47,6 +47,7 @@ Source5: gen_libs.sh
|
||||
|
||||
Patch0: %{name}-drop-flags.patch
|
||||
Patch1: %{name}-drop-rpath.patch
|
||||
Patch100: %{name}-fix-quit.patch
|
||||
|
||||
BuildRequires: cmake(Qt5Svg)
|
||||
BuildRequires: cmake(Qt5Widgets)
|
||||
@ -131,6 +132,9 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/%{name}.desktop
|
||||
%{_datadir}/icons/hicolor/*/apps/%{name}.*
|
||||
|
||||
%changelog
|
||||
* Thu Jul 12 2018 Vitaly Zaitsev <vitaly@easycoding.org> - 0.4.3-2
|
||||
- Fixed issue with system shutdown on KDE Plasma.
|
||||
|
||||
* Sun Jun 03 2018 Vitaly Zaitsev <vitaly@easycoding.org> - 0.4.3-1
|
||||
- Updated to version 0.4.3.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user