From f2f7024419ee5c995b1134a9e1873faf65d76015 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Nov 29 2018 14:41:28 +0000 Subject: Add upstream fix for Sugar regression (rhbz 1519042) --- diff --git a/metacity-ggo04.patch b/metacity-ggo04.patch new file mode 100644 index 0000000..968235b --- /dev/null +++ b/metacity-ggo04.patch @@ -0,0 +1,72 @@ +From 074af8f87ef89b13ff326fb5d04ee424bbfd4ced Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Alberts=20Muktup=C4=81vels?= +Date: Thu, 29 Nov 2018 15:17:58 +0200 +Subject: [PATCH] revert "unminimize windows with initial IconicState if first + known on MapRequest" + +According to ICCCM client is allowed to go from Withdrawn to Iconic +state. Also there are x11 apps that has -iconic command line option +that was broken. + +Revert 6875256e63fbfd4500ddd27a7bf1aafc8d4c1ca3 commit to restore +previous behaviour. + +https://gitlab.gnome.org/GNOME/metacity/issues/4 +--- + src/core/display.c | 38 +++++++++++++------------------------- + 1 file changed, 13 insertions(+), 25 deletions(-) + +diff --git a/src/core/display.c b/src/core/display.c +index ed0aaf7f..273c97c5 100644 +--- a/src/core/display.c ++++ b/src/core/display.c +@@ -2297,34 +2297,22 @@ event_callback (XEvent *event, + { + window = meta_window_new (display, event->xmaprequest.window, FALSE, + META_EFFECT_TYPE_CREATE); +- +- /* The window might have initial iconic state, but this is a +- * MapRequest, fall through to ensure it is unminimized in +- * that case. +- */ + } +- else if (frame_was_receiver) ++ /* if frame was receiver it's some malicious send event or something */ ++ else if (!frame_was_receiver && window) + { +- g_warning ("Map requests on the frame window are unexpected"); +- break; +- } +- +- /* Double check that creating the MetaWindow succeeded */ +- if (window == NULL) +- break; +- +- meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n", +- window->desc, window->mapped, window->minimized); +- +- if (window->minimized) +- { +- meta_window_unminimize (window); +- if (window->workspace != window->screen->active_workspace) ++ meta_verbose ("MapRequest on %s mapped = %d minimized = %d\n", ++ window->desc, window->mapped, window->minimized); ++ if (window->minimized) + { +- meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n", +- window->mapped, window->minimized); +- meta_window_change_workspace (window, +- window->screen->active_workspace); ++ meta_window_unminimize (window); ++ if (window->workspace != window->screen->active_workspace) ++ { ++ meta_verbose ("Changing workspace due to MapRequest mapped = %d minimized = %d\n", ++ window->mapped, window->minimized); ++ meta_window_change_workspace (window, ++ window->screen->active_workspace); ++ } + } + } + break; +-- +2.18.1 diff --git a/metacity.spec b/metacity.spec index 3bf8faa..7acaac2 100644 --- a/metacity.spec +++ b/metacity.spec @@ -1,12 +1,13 @@ Summary: Unobtrusive window manager Name: metacity Version: 3.30.1 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://download.gnome.org/sources/metacity/ Source0: http://download.gnome.org/sources/metacity/3.30/metacity-%{version}.tar.xz +Patch1: metacity-ggo04.patch License: GPLv2+ -Group: User Interface/Desktops + BuildRequires: pkgconfig(gtk+-3.0) >= 3.22.0 BuildRequires: pkgconfig(gio-2.0) >= 2.44.0 BuildRequires: pkgconfig(gsettings-desktop-schemas) @@ -41,7 +42,6 @@ It strives to be quiet, small, stable, get on with its job, and stay out of your attention. %package devel -Group: Development/Libraries Summary: Development files for metacity Requires: %{name} = %{version}-%{release} @@ -52,7 +52,7 @@ programs using the metacity-private library, since it is a private API. This package exists purely for technical reasons. %prep -%setup -q +%autosetup -p1 # force regeneration rm -f src/org.gnome.metacity.gschema.valid @@ -116,6 +116,9 @@ find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' %{_mandir}/man1/metacity-window-demo.1.gz %changelog +* Thu Nov 29 2018 Peter Robinson 3.30.1-2 +- Add upstream fix for Sugar regression (rhbz 1519042) + * Mon Nov 12 2018 Yaakov Selkowitz - 3.30.1-1 - Update to 3.30.1