From 8cc345fcf5346b676315dcd4b809d1b420bb4b27 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 16 Nov 2015 15:31:55 -0800 Subject: [PATCH] window: Allow minimizing windows which don't advertise support for it Wine removes the minimize func from its Motif hints on full-screen windows, because, as the Win32 API literally says, the minimize button is indeed not visible on full-screen windows. Given that this code was added to prevent minimizing a panel by accident, I don't necessarily think that it's relevant anymore. https://bugzilla.gnome.org/show_bug.cgi?id=758186 --- src/core/window.c | 5 +++++ src/x11/window-x11.c | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/window.c b/src/core/window.c index 7ae0467d3..b21b6bb26 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -5302,6 +5302,11 @@ meta_window_recalc_features (MetaWindow *window) meta_window_recalc_skip_features (window); + /* To prevent users from losing windows, let's prevent users from + * minimizing skip-taskbar windows through the window decorations. */ + if (window->skip_taskbar) + window->has_minimize_func = FALSE; + meta_topic (META_DEBUG_WINDOW_OPS, "Window %s decorated = %d border_only = %d has_close = %d has_minimize = %d has_maximize = %d has_move = %d has_shade = %d skip_taskbar = %d skip_pager = %d\n", window->desc, diff --git a/src/x11/window-x11.c b/src/x11/window-x11.c index 35d9c7a63..c4de328fe 100644 --- a/src/x11/window-x11.c +++ b/src/x11/window-x11.c @@ -389,7 +389,7 @@ meta_window_apply_session_info (MetaWindow *window, "Restoring minimized state %d for window %s\n", info->minimized, window->desc); - if (window->has_minimize_func && info->minimized) + if (info->minimized) meta_window_minimize (window); } @@ -2441,8 +2441,7 @@ meta_window_x11_client_message (MetaWindow *window, { meta_verbose ("WM_CHANGE_STATE client message, state: %ld\n", event->xclient.data.l[0]); - if (event->xclient.data.l[0] == IconicState && - window->has_minimize_func) + if (event->xclient.data.l[0] == IconicState) meta_window_minimize (window); return TRUE;