From 711cc42b23333b55ecbd223a053c2926a9400664 Mon Sep 17 00:00:00 2001 From: handsome_feng Date: Mon, 27 Jun 2022 03:53:22 +0000 Subject: [PATCH] =?UTF-8?q?!2=20=E4=BD=BF=E7=94=A8kysdk=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E4=BB=A5=E8=A7=A3=E5=86=B3wayland=E7=8E=AF=E5=A2=83=E4=B8=8B?= =?UTF-8?q?=E7=AA=97=E5=8F=A3=E4=BD=8D=E7=BD=AE=E5=BC=82=E5=B8=B8=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=8F=8C=E6=A0=87=E9=A2=98=E6=A0=8F=E9=97=AE=E9=A2=98?= =?UTF-8?q?.=20Merge=20pull=20request=20!2=20from=20iaom/openkylin/yangtze?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/control | 3 +- ....-Merge-pull-request-2-from-iaom-ope.patch | 112 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0002-2-kysdk-wayland-.-Merge-pull-request-2-from-iaom-ope.patch diff --git a/debian/control b/debian/control index cecebc8..e7587d9 100644 --- a/debian/control +++ b/debian/control @@ -21,7 +21,8 @@ Build-Depends: debhelper (>=9.0.0), qtbase5-dev, qtchooser, qtscript5-dev, - qttools5-dev-tools + qttools5-dev-tools, + libkysdk-waylandhelper-dev Standards-Version: 4.5.0 Homepage: https://www.ukui.org/ Vcs-Git: https://github.com/ukui/ukui-search.git diff --git a/debian/patches/0002-2-kysdk-wayland-.-Merge-pull-request-2-from-iaom-ope.patch b/debian/patches/0002-2-kysdk-wayland-.-Merge-pull-request-2-from-iaom-ope.patch new file mode 100644 index 0000000..90f0751 --- /dev/null +++ b/debian/patches/0002-2-kysdk-wayland-.-Merge-pull-request-2-from-iaom-ope.patch @@ -0,0 +1,112 @@ +From: cckylin-cibot +Date: Mon, 27 Jun 2022 03:53:21 +0000 +Subject: =?utf-8?b?ITIg5L2/55Soa3lzZGvmjqXlj6Pku6Xop6PlhrN3YXlsYW5k546v5aKD?= + =?utf-8?b?5LiL56qX5Y+j5L2N572u5byC5bi46Zeu6aKY5Y+M5qCH6aKY5qCP6Zeu6aKYLiBN?= + =?utf-8?b?ZXJnZSBwdWxsIHJlcXVlc3QgITIgZnJvbSBpYW9tL29wZW5reWxpbi95YW5ndHpl?= + +--- + frontend/control/create-index-ask-dialog.cpp | 2 +- + frontend/frontend.pro | 2 +- + frontend/mainwindow.cpp | 26 ++++++++++++++++---------- + 3 files changed, 18 insertions(+), 12 deletions(-) + +diff --git a/frontend/control/create-index-ask-dialog.cpp b/frontend/control/create-index-ask-dialog.cpp +index dcf62d7..f0f4e58 100644 +--- a/frontend/control/create-index-ask-dialog.cpp ++++ b/frontend/control/create-index-ask-dialog.cpp +@@ -21,7 +21,7 @@ + + #include "create-index-ask-dialog.h" + #include +-#include "kwindowsystem.h" ++#include + + #define MAIN_SIZE QSize(380, 202) + #define MAIN_SPACING 0 +diff --git a/frontend/frontend.pro b/frontend/frontend.pro +index 80f9c26..2ece39b 100644 +--- a/frontend/frontend.pro ++++ b/frontend/frontend.pro +@@ -7,7 +7,7 @@ DEFINES += VERSION='\\"$${VERSION}\\"' + TARGET = ukui-search + TEMPLATE = app + +-PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 ++PKGCONFIG += gio-2.0 glib-2.0 gio-unix-2.0 kysdk-waylandhelper + CONFIG += c++11 link_pkgconfig no_keywords lrelease + LIBS += -lxapian -lgsettings-qt -lquazip5 -lX11 + #LIBS += -lukui-log4qt +diff --git a/frontend/mainwindow.cpp b/frontend/mainwindow.cpp +index f5f4a5c..feb0d59 100644 +--- a/frontend/mainwindow.cpp ++++ b/frontend/mainwindow.cpp +@@ -31,10 +31,12 @@ + #include + #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) + #include +-#include "kwindowsystem.h" ++#include + #endif +-#include "global-settings.h" + #include ++#include "ukuistylehelper/ukuistylehelper.h" ++#include "windowmanager/windowmanager.h" ++#include "global-settings.h" + + #define MAIN_MARGINS 0, 0, 0, 0 + #define TITLE_MARGINS 0,0,0,0 +@@ -150,11 +152,11 @@ void MainWindow::initUi() { + //创建索引询问弹窗 + m_askDialog = new CreateIndexAskDialog(this); + #if (QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)) +- MotifWmHints ask_dialog_hints; +- ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; +- ask_dialog_hints.functions = MWM_FUNC_ALL; +- ask_dialog_hints.decorations = MWM_DECOR_BORDER; +- XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints); ++// MotifWmHints ask_dialog_hints; ++// ask_dialog_hints.flags = MWM_HINTS_FUNCTIONS | MWM_HINTS_DECORATIONS; ++// ask_dialog_hints.functions = MWM_FUNC_ALL; ++// ask_dialog_hints.decorations = MWM_DECOR_BORDER; ++// XAtomHelper::getInstance()->setWindowMotifHint(m_askDialog->winId(), ask_dialog_hints); + #endif + } + +@@ -192,7 +194,6 @@ void MainWindow::bootOptionsFilter(QString opt) { + if (this->isHidden()) { + clearSearchResult(); + centerToScreen(this); +- this->show(); + this->m_searchBarWidget->setFocus(); + this->activateWindow(); + } +@@ -217,7 +218,6 @@ void MainWindow::trayIconActivatedSlot(QSystemTrayIcon::ActivationReason reason) + if(!this->isVisible()) { + clearSearchResult(); + centerToScreen(this); +- this->show(); + // this->m_searchLineEdit->focusIn(); //打开主界面时输入框夺焦,可直接输入 + this->raise(); + this->activateWindow(); +@@ -421,7 +421,12 @@ void MainWindow::centerToScreen(QWidget* widget) { + // desk_x = width; + // desk_y = height; + // } +- widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 3 + desk_rect.top()); ++ widget->show(); ++ kdk::WindowManager::setGeometry(this->windowHandle(),QRect(desk_x / 2 - x / 2 + desk_rect.left(), ++ desk_y / 3 + desk_rect.top(), ++ this->width(), ++ this->height())); ++// widget->move(desk_x / 2 - x / 2 + desk_rect.left(), desk_y / 3 + desk_rect.top()); + } + + void MainWindow::initGsettings() { +@@ -460,6 +465,7 @@ void MainWindow::initTimer() { + connect(m_askTimer, &QTimer::timeout, this, [ = ]() { + if(this->isVisible()) { + m_isAskDialogVisible = true; ++ kdk::UkuiStyleHelper::self()->removeHeader(m_askDialog); + m_askDialog->show(); + m_currentSearchAsked = true; + } diff --git a/debian/patches/series b/debian/patches/series index d1528d4..475bbbd 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-1.patch +0002-2-kysdk-wayland-.-Merge-pull-request-2-from-iaom-ope.patch