add 0005-8-wayland.patch
This commit is contained in:
parent
5c78e534c4
commit
01a5f50424
128
0005-8-wayland.patch
Normal file
128
0005-8-wayland.patch
Normal file
@ -0,0 +1,128 @@
|
||||
From: cckylin-cibot <cckylin-cibot@kylinos.cn>
|
||||
Date: Tue, 12 Jul 2022 08:55:07 +0000
|
||||
Subject: =?utf-8?b?ITgg6Kej5Yazd2F5bGFuZOeql+WPo+eKtuaAgemUmeivr+WvvOiHtA==?=
|
||||
=?utf-8?b?5byA5aeL6I+c5Y2V5Y2V5L6L5pi+56S66ZqQ6JeP5aSx6LSl6Zeu6aKY?=
|
||||
|
||||
---
|
||||
src/QtSingleApplication/qtsingleapplication.cpp | 24 +++++++++++-------------
|
||||
src/UserInterface/ListView/klistview.cpp | 1 +
|
||||
src/UserInterface/mainwindow.cpp | 13 ++++++++++++-
|
||||
src/UserInterface/mainwindow.h | 6 +++---
|
||||
4 files changed, 27 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/QtSingleApplication/qtsingleapplication.cpp b/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
index e3ba444..d957182 100755
|
||||
--- a/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
+++ b/src/QtSingleApplication/qtsingleapplication.cpp
|
||||
@@ -350,19 +350,17 @@ void QtSingleApplication::activateWindow()
|
||||
myDebug() << "单例触发activateWindow";
|
||||
if (!g_projectCodeName.contains("V10SP1-edu")) {
|
||||
MainWindow *w = qobject_cast<MainWindow *>(actWin);
|
||||
-
|
||||
- if (this->applicationState() & Qt::ApplicationInactive) {
|
||||
- myDebug() << "单例内触发开始菜单显示";
|
||||
- actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
- // actWin->raise();
|
||||
- // actWin->showNormal();
|
||||
- // actWin->activateWindow();
|
||||
- w->showWindow();
|
||||
- } else {
|
||||
- myDebug() << "单例内触发开始菜单隐藏";
|
||||
- actWin->setWindowState(actWin->windowState() & Qt::WindowMinimized);
|
||||
- w->hideWindow();
|
||||
- }
|
||||
+ w->windowOption();
|
||||
+
|
||||
+// if (this->applicationState() & Qt::ApplicationInactive) {
|
||||
+// myDebug() << "单例内触发开始菜单显示";
|
||||
+// actWin->setWindowState(actWin->windowState() & ~Qt::WindowMinimized);
|
||||
+// w->showWindow();
|
||||
+// } else {
|
||||
+// myDebug() << "单例内触发开始菜单隐藏";
|
||||
+// actWin->setWindowState(actWin->windowState() & Qt::WindowMinimized);
|
||||
+// w->hideWindow();
|
||||
+// }
|
||||
} else {
|
||||
TabletWindow *w = qobject_cast<TabletWindow *>(actWin);
|
||||
w->showPCMenu();
|
||||
diff --git a/src/UserInterface/ListView/klistview.cpp b/src/UserInterface/ListView/klistview.cpp
|
||||
index b927ba2..96a03e6 100755
|
||||
--- a/src/UserInterface/ListView/klistview.cpp
|
||||
+++ b/src/UserInterface/ListView/klistview.cpp
|
||||
@@ -63,6 +63,7 @@ void KListView::paintEvent(QPaintEvent *e)
|
||||
void KListView::mouseMoveEvent(QMouseEvent *e)
|
||||
{
|
||||
this->clearFocus();
|
||||
+ return QListView::mouseMoveEvent(e);
|
||||
}
|
||||
|
||||
void KListView::mousePressEvent(QMouseEvent *event)
|
||||
diff --git a/src/UserInterface/mainwindow.cpp b/src/UserInterface/mainwindow.cpp
|
||||
index d65d221..4a3f7d9 100755
|
||||
--- a/src/UserInterface/mainwindow.cpp
|
||||
+++ b/src/UserInterface/mainwindow.cpp
|
||||
@@ -181,7 +181,7 @@ void MainWindow::registDbusServer()
|
||||
} else {
|
||||
m_fullWindow->show();
|
||||
setMaxWindowPos();
|
||||
- // fullWindow->raise();
|
||||
+ m_fullWindow->raise();
|
||||
m_fullWindow->activateWindow();
|
||||
}
|
||||
}
|
||||
@@ -506,6 +506,15 @@ void MainWindow::initTabOrder()
|
||||
setTabOrder(m_minMaxChangeButton, m_powerOffButton);
|
||||
}
|
||||
|
||||
+void MainWindow::windowOption()
|
||||
+{
|
||||
+ if (this->isVisible() || m_fullWindow->isVisible()) {
|
||||
+ hideWindow();
|
||||
+ } else {
|
||||
+ showWindow();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
void MainWindow::initUi()
|
||||
{
|
||||
qDebug() << "init UI";
|
||||
@@ -684,6 +693,7 @@ bool MainWindow::event(QEvent *event)
|
||||
if (QEvent::WindowDeactivate == event->type()) { //窗口停用
|
||||
if (QApplication::activeWindow() != this) {
|
||||
qDebug() << " * 鼠标点击窗口外部事件";
|
||||
+ this->setWindowState(this->windowState() & Qt::WindowMinimized);
|
||||
this->hide();
|
||||
m_topStackedWidget->setCurrentIndex(0);
|
||||
m_lineEdit->clear();
|
||||
@@ -1340,6 +1350,7 @@ void MainWindow::repaintWidget()
|
||||
m_fullWindow->setFixedSize(width, height);
|
||||
m_fullWindow->repaintWidget();
|
||||
}
|
||||
+
|
||||
void MainWindow::showNormalWindowSlot()
|
||||
{
|
||||
myDebug() << "Style::m_availableScreenWidth" << Style::m_availableScreenWidth << "Style::m_availableScreenHeight" << Style::m_availableScreenHeight;
|
||||
diff --git a/src/UserInterface/mainwindow.h b/src/UserInterface/mainwindow.h
|
||||
index 4f0baf3..30aa46b 100755
|
||||
--- a/src/UserInterface/mainwindow.h
|
||||
+++ b/src/UserInterface/mainwindow.h
|
||||
@@ -65,9 +65,7 @@ public:
|
||||
explicit MainWindow(QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
- void showWindow();
|
||||
-
|
||||
- void hideWindow();
|
||||
+ void windowOption();
|
||||
|
||||
protected:
|
||||
void initSearchUi();
|
||||
@@ -81,6 +79,8 @@ protected:
|
||||
void registDbusServer();
|
||||
void setTabletModeFlag();
|
||||
void initUi();
|
||||
+ void showWindow();
|
||||
+ void hideWindow();
|
||||
/**
|
||||
* @brief 处理外部点击事件和主窗口键盘控制
|
||||
* @param event
|
||||
@ -1,6 +1,6 @@
|
||||
Name: ukui-menu
|
||||
Version: 3.1.1
|
||||
Release: 8
|
||||
Release: 9
|
||||
Summary: Advanced ukui menu
|
||||
License: GPL-3.0-or-later
|
||||
URL: http://www.ukui.org
|
||||
@ -12,6 +12,7 @@ patch04: 0001-4-wayland.patch
|
||||
patch05: 0002-5-platformName-update-debian-changelog.-platformName.patch
|
||||
patch06: 0003-.patch
|
||||
patch07: 0004-7-close-cd-128489.patch
|
||||
patch08: 0005-8-wayland.patch
|
||||
|
||||
BuildRequires: qt5-qtbase-devel
|
||||
BuildRequires: libqtxdg-devel
|
||||
@ -64,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%{_datadir}/ukui-menu/translations/
|
||||
|
||||
%changelog
|
||||
* Tue Feb 21 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-9
|
||||
- add 0005-8-wayland.patch
|
||||
|
||||
* Mon Feb 20 2023 peijiankang <peijiankang@kylinos.cn> - 3.1.1-8
|
||||
- add 0004-7-close-cd-128489.patch
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user