Backport upstream patches.

ubuntu/kinetic
Simon Quigley 2 years ago
parent 228de11ff9
commit d222689a94

11
debian/changelog vendored

@ -1,3 +1,14 @@
lxqt-runner (1.1.0-0ubuntu2) UNRELEASED; urgency=medium
* Backport upstream patches:
- https://github.com/lxqt/lxqt-runner/pull/221
- Force correct position after move from outside
+ https://github.com/lxqt/lxqt-runner/commit/703db2
- Listen to KwindowSystem signals only when shown
+ https://github.com/lxqt/lxqt-runner/commit/88a4d2
-- Simon Quigley <tsimonq2@ubuntu.com> Sat, 11 Jun 2022 14:25:20 -0400
lxqt-runner (1.1.0-0ubuntu1) kinetic; urgency=medium
* New upstream release.

@ -0,0 +1,52 @@
From 703db225dfa722af66e330547a3353238e76ec38 Mon Sep 17 00:00:00 2001
From: Palo Kisa <palo.kisa@gmail.com>
Date: Wed, 27 Apr 2022 08:27:06 +0200
Subject: [PATCH] dialog: Force correct position after move from outside
..of application.
For some reason the dialog gets repositioned by "outer world" (VM?) to
wrong position (0,0). The root cause of this move is yet unknown and
this is a workaround to avoid wong position of the window.
---
dialog.cpp | 14 ++++++++++++++
dialog.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/dialog.cpp b/dialog.cpp
index 7164c65..5667817 100644
--- a/dialog.cpp
+++ b/dialog.cpp
@@ -183,6 +183,20 @@ void Dialog::resizeEvent(QResizeEvent *event)
}
+/************************************************
+
+ ************************************************/
+void Dialog::moveEvent(QMoveEvent *event)
+{
+ // Note: For some reason the dialog gets repositioned by "outer world" (VM?) to
+ // wrong position (0,0). The root cause of this move is yet unknown and
+ // this is a workaround to avoid wong position of the window.
+ if (event->spontaneous())
+ QTimer::singleShot(0, this, &Dialog::realign);
+ return QDialog::moveEvent(event);
+}
+
+
/************************************************
************************************************/
diff --git a/dialog.h b/dialog.h
index 0ca29bf..a71dd3d 100644
--- a/dialog.h
+++ b/dialog.h
@@ -64,6 +64,7 @@ class Dialog : public QDialog
protected:
void closeEvent(QCloseEvent *event);
void resizeEvent(QResizeEvent *event);
+ void moveEvent(QMoveEvent *event);
bool eventFilter(QObject *object, QEvent *event);
bool editKeyPressEvent(QKeyEvent *event);
bool listKeyPressEvent(QKeyEvent *event);

@ -0,0 +1,75 @@
From 88a4d2fb49bc37794a14b7d86b90d515f472d372 Mon Sep 17 00:00:00 2001
From: Palo Kisa <palo.kisa@gmail.com>
Date: Wed, 27 Apr 2022 08:32:54 +0200
Subject: [PATCH] dialog: Listen to KwindowSystem signals only when shown
Most of the time the runner window is not shown and we don't need to be
notified about all the focus/desktop changes.
---
dialog.cpp | 25 ++++++++++++++++++++++---
dialog.h | 2 ++
2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/dialog.cpp b/dialog.cpp
index 5667817..0b9a0e9 100644
--- a/dialog.cpp
+++ b/dialog.cpp
@@ -133,8 +133,6 @@ Dialog::Dialog(QWidget *parent) :
connect(mGlobalShortcut, &GlobalKeyShortcut::Action::activated, this, &Dialog::showHide);
connect(mGlobalShortcut, &GlobalKeyShortcut::Action::shortcutChanged, this, &Dialog::shortcutChanged);
- connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &Dialog::onActiveWindowChanged);
- connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &Dialog::onCurrentDesktopChanged);
resize(mSettings->value(QL1S("dialog/width"), 400).toInt(), size().height());
@@ -197,6 +195,28 @@ void Dialog::moveEvent(QMoveEvent *event)
}
+/************************************************
+
+ ************************************************/
+void Dialog::showEvent(QShowEvent *event)
+{
+ connect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &Dialog::onActiveWindowChanged);
+ connect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &Dialog::onCurrentDesktopChanged);
+ return QDialog::showEvent(event);
+}
+
+
+/************************************************
+
+ ************************************************/
+void Dialog::hideEvent(QHideEvent *event)
+{
+ QDialog::hideEvent(event);
+ disconnect(KWindowSystem::self(), &KWindowSystem::currentDesktopChanged, this, &Dialog::onCurrentDesktopChanged);
+ disconnect(KWindowSystem::self(), &KWindowSystem::activeWindowChanged, this, &Dialog::onActiveWindowChanged);
+}
+
+
/************************************************
************************************************/
@@ -397,7 +417,6 @@ void Dialog::applySettings()
mCommandItemModel->showHistoryFirst(mSettings->value(QL1S("dialog/history_first"), true).toBool());
ui->commandList->setShownCount(mSettings->value(QL1S("dialog/list_shown_items"), 4).toInt());
- realign();
mSettings->sync();
}
diff --git a/dialog.h b/dialog.h
index a71dd3d..8b7b36f 100644
--- a/dialog.h
+++ b/dialog.h
@@ -65,6 +65,8 @@ class Dialog : public QDialog
void closeEvent(QCloseEvent *event);
void resizeEvent(QResizeEvent *event);
void moveEvent(QMoveEvent *event);
+ void showEvent(QShowEvent *event);
+ void hideEvent(QHideEvent *event);
bool eventFilter(QObject *object, QEvent *event);
bool editKeyPressEvent(QKeyEvent *event);
bool listKeyPressEvent(QKeyEvent *event);

@ -0,0 +1,2 @@
221-1.patch
221-2.patch
Loading…
Cancel
Save