From 58ee549f9b7157cffef37ecea1af3a6dc268ef17 Mon Sep 17 00:00:00 2001 From: hanshuang Date: Wed, 1 Feb 2023 17:01:52 +0800 Subject: [PATCH] change to metacity --- 0002-kwin-change-to-metacity.patch | 67 ++++++++++++++++++++++++++++++ startdde.spec | 7 +++- 2 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 0002-kwin-change-to-metacity.patch diff --git a/0002-kwin-change-to-metacity.patch b/0002-kwin-change-to-metacity.patch new file mode 100644 index 0000000..cdc59a7 --- /dev/null +++ b/0002-kwin-change-to-metacity.patch @@ -0,0 +1,67 @@ +From 5daab49deb681329d6b8531337e365e0ac247bb3 Mon Sep 17 00:00:00 2001 +From: root +Date: Sat, 28 Jan 2023 15:42:23 +0800 +Subject: [PATCH 2/2] kwin change to metacity + + +diff --git a/main.go b/main.go +index 62b8b4d..979b1d2 100644 +--- a/main.go ++++ b/main.go +@@ -92,12 +92,12 @@ func reapZombies() { + } + + func shouldUseDDEKWin() bool { +- _, err := os.Stat("/usr/bin/kwin_no_scale") ++ _, err := os.Stat("/usr/bin/metacity") + return err == nil + } + + const ( +- cmdKWin = "/usr/bin/kwin_no_scale" ++ cmdKWin = "/usr/bin/metacity" + cmdDdeSessionDaemon = "/usr/libexec/deepin-daemon/dde-session-daemon" + cmdDdeDock = "/usr/bin/dde-dock" + cmdDdeDesktop = "/usr/bin/dde-desktop" +diff --git a/main_test.go b/main_test.go +index c021639..f20dce8 100644 +--- a/main_test.go ++++ b/main_test.go +@@ -27,7 +27,7 @@ import ( + func TestShouldUseDDEKWin(t *testing.T) { + t.Run("Test is should use DDE KWin", func(t *testing.T) { + should := shouldUseDDEKWin() +- exist := Exist("/usr/bin/kwin_no_scale") ++ exist := Exist("/usr/bin/metacity") + assert.Equal(t, exist, should) + }) + } +diff --git a/rpm/main.go.patch b/rpm/main.go.patch +index d820e16..2c4345d 100644 +--- a/rpm/main.go.patch ++++ b/rpm/main.go.patch +@@ -3,7 +3,7 @@ + @@ -89,7 +89,7 @@ + + const ( +- cmdKWin = "/usr/bin/kwin_no_scale" ++ cmdKWin = "/usr/bin/metacity" + - cmdDdeSessionDaemon = "/usr/lib/deepin-daemon/dde-session-daemon" + + cmdDdeSessionDaemon = "/usr/libexec/deepin-daemon/dde-session-daemon" + cmdDdeDock = "/usr/bin/dde-dock" +diff --git a/watchdog/dde_kwin.go b/watchdog/dde_kwin.go +index 8fa6367..ecc1b3d 100644 +--- a/watchdog/dde_kwin.go ++++ b/watchdog/dde_kwin.go +@@ -6,7 +6,7 @@ import ( + + const ( + kWinServiceName = "org.kde.KWin" +- ddeKWinCommand = "kwin_no_scale" ++ ddeKWinCommand = "metacity" + ) + + func isDdeKWinRunning() (bool, error) { +-- +2.31.1 + diff --git a/startdde.spec b/startdde.spec index 201b2cc..05db207 100644 --- a/startdde.spec +++ b/startdde.spec @@ -1,9 +1,10 @@ +%global anolis_release .0.1 %global _missing_build_ids_terminate_build 0 %global debug_package %{nil} Name: startdde Version: 5.8.55 -Release: 2%{?dist} +Release: 2%{anolis_release}%{?dist} Summary: Starter of deepin desktop environment License: GPLv3 URL: https://github.com/linuxdeepin/startdde @@ -11,6 +12,7 @@ Source0: %{name}-%{version}.tar.gz Patch1000: Makefile.patch Patch1001: main.go.patch +Patch1002: 0002-kwin-change-to-metacity.patch BuildRequires: golang BuildRequires: jq @@ -141,6 +143,9 @@ fi /usr/share/locale/zh_TW/LC_MESSAGES/startdde.mo %changelog +* Wed Feb 01 2023 hanshuang - 5.8.55-2.0.1 +- change to metacity + * Thu Jul 21 2022 liuxingwei liuxingwei@uniontech.com - 5.8.55-2 - rebuild for an8.6 -- Gitee