diff --git a/huawei-remove-XResQueryClientIds-to-get-pid.patch b/huawei-remove-XResQueryClientIds-to-get-pid.patch new file mode 100644 index 0000000..a0c7c0f --- /dev/null +++ b/huawei-remove-XResQueryClientIds-to-get-pid.patch @@ -0,0 +1,90 @@ +From: wuchaochao +Date: Mon Feb 21 17:34:47 CST 2022 +Subject: [PATCH] remove XResQueryClientIds to get pid +Signed-off-by: wuchaochao +--- + configure.ac | 2 -+ + src/core/window-props.c | 47 3 ----------------------------------------- + 2 files changed, 1 insertions(+), 49 deletion(-) + +diff -Naur metacity-3.37.1/configure.ac m2/configure.ac +--- metacity-3.37.1/configure.ac 2020-05-01 23:26:06.000000000 +0800 ++++ m2/configure.ac 2022-02-21 17:05:17.732000000 +0800 +@@ -144,7 +144,7 @@ + ## byte order + AC_C_BIGENDIAN + +-METACITY_PC_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION gio-2.0 >= $GLIB_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION gsettings-desktop-schemas >= 3.3.0 xcomposite >= $XCOMPOSITE_REQUIRED_VERSION xfixes xrender xdamage xres" ++METACITY_PC_MODULES="gtk+-3.0 >= $GTK_REQUIRED_VERSION gio-2.0 >= $GLIB_REQUIRED_VERSION pango >= $PANGO_REQUIRED_VERSION gsettings-desktop-schemas >= 3.3.0 xcomposite >= $XCOMPOSITE_REQUIRED_VERSION xfixes xrender xdamage" + + GLIB_GSETTINGS + +diff -Naur metacity-3.37.1/src/core/window-props.c m2/src/core/window-props.c +--- metacity-3.37.1/src/core/window-props.c 2020-05-01 22:48:27.000000000 +0800 ++++ m2/src/core/window-props.c 2022-02-21 17:08:17.524000000 +0800 +@@ -43,7 +43,6 @@ + #include "frame-private.h" + #include "group.h" + #include +-#include + #include + #include + #include +@@ -396,56 +395,11 @@ + window->role = g_strdup (value->v.str); + } + +-static pid_t +-get_local_pid (MetaWindow *window) +-{ +- pid_t pid; +- XResClientIdSpec spec; +- long num_ids; +- XResClientIdValue *client_ids; +- long i; +- +- pid = -1; +- +- spec.client = window->xwindow; +- spec.mask = XRES_CLIENT_ID_PID_MASK; +- +- XResQueryClientIds (window->display->xdisplay, +- 1, +- &spec, +- &num_ids, +- &client_ids); +- +- for (i = 0; i < num_ids; i++) +- { +- if (client_ids[i].spec.mask == XRES_CLIENT_ID_PID_MASK) +- { +- pid = XResGetClientPid (&client_ids[i]); +- break; +- } +- } +- +- XResClientIdsDestroy (num_ids, client_ids); +- +- return pid; +-} +- + static void + reload_net_wm_pid (MetaWindow *window, + MetaPropValue *value, + gboolean initial) + { +- pid_t pid; +- +- pid = get_local_pid (window); +- +- if (pid != -1) +- { +- meta_verbose ("Ignoring _NET_WM_PID in favor of XResGetClientPid\n"); +- +- window->net_wm_pid = pid; +- return; +- } + + if (value->type != META_PROP_VALUE_INVALID) + { + \ No newline at end of file diff --git a/metacity.spec b/metacity.spec index 7a7165a..3671cde 100644 --- a/metacity.spec +++ b/metacity.spec @@ -1,6 +1,6 @@ Name: metacity Version: 3.37.1 -Release: 2 +Release: 3 Summary: Window Manager for the MATE and GNOME Flashback desktops License: GPLv2+ URL: https://download.gnome.org/sources/metacity/ @@ -8,19 +8,23 @@ Source0: https://download.gnome.org/sources/metacity/3.37/%{name}-%{versi BuildRequires: libXinerama-devel libSM-devel libICE-devel libX11-devel desktop-file-utils itstool -BuildRequires: autoconf, automake, gettext-devel, libtool, gnome-common yelp-tools zenity vulkan-devel +BuildRequires: autoconf, automake, gettext-devel, libtool, gnome-common yelp-tools zenity BuildRequires: pkgconfig(gtk+-3.0) >= 3.22.0 pkgconfig(gio-2.0) >= 2.44.0 BuildRequires: pkgconfig(gsettings-desktop-schemas) pkgconfig(pango) %if %{?openEuler:1}0 BuildRequires: pkgconfig(libcanberra-gtk3) +BuildRequires: pkgconfig(xres) vulkan-devel %endif BuildRequires: pkgconfig(libstartup-notification-1.0) pkgconfig(xcomposite) pkgconfig(xfixes) pkgconfig(xrender) BuildRequires: pkgconfig(xdamage) pkgconfig(xrender) pkgconfig(xcursor) pkgconfig(libgtop-2.0) -BuildRequires: pkgconfig(xres) Requires: startup-notification gsettings-desktop-schemas zenity Provides: firstboot(windowmanager) = metacity +%if !0%{?openEuler} +Patch9000: huawei-remove-XResQueryClientIds-to-get-pid.patch +%endif + %description Metacity is a small window manager, using GTK+ to do everything. It is developed mainly for the MATE and GNOME Flashback desktops. @@ -82,6 +86,9 @@ make CPPFLAGS="$CPPFLAGS" LIBS="$LIBS" %{?_smp_mflags} %{_mandir}/man1/*.gz %changelog +* Fri Apr 1 2022 wuchaochao - 3.37.1-3 +- remove XResQueryClientIds to get pid and remove BuildRequires:vulkan-devel + * Sat Mar 05 2022 hanhui - 3.37.1-2 - custom installation depend on libcanberra