From 20a98e1c2a5d5fda27934ad154252b4366f70dac Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Sun, 3 Mar 2002 00:03:50 +0000 Subject: [PATCH] disable resize etc. if we're fullscreen (constrain_size): fix size 2002-03-02 Havoc Pennington * src/window.c (recalc_window_features): disable resize etc. if we're fullscreen (constrain_size): fix size constraints when fullscreen * src/display.c (meta_display_open): fix missing comma that ended up concatenating two of the properties breaking FULLSCREEN state and PING protocol --- ChangeLog | 10 ++++++++++ src/display.c | 2 +- src/window.c | 17 ++++++++++++++--- 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9f8aab794..586d65963 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-03-02 Havoc Pennington + + * src/window.c (recalc_window_features): disable resize etc. if + we're fullscreen + (constrain_size): fix size constraints when fullscreen + + * src/display.c (meta_display_open): fix missing comma that + ended up concatenating two of the properties breaking + FULLSCREEN state and PING protocol + 2002-03-02 Havoc Pennington * src/display.c: Add hacking to fix the problem that we made our diff --git a/src/display.c b/src/display.c index c48554e1e..f61ba9b63 100644 --- a/src/display.c +++ b/src/display.c @@ -200,7 +200,7 @@ meta_display_open (const char *name) "_NET_WM_STATE_HIDDEN", "_NET_WM_WINDOW_TYPE_UTILITY", "_NET_WM_WINDOW_TYPE_SPLASHSCREEN", - "_NET_WM_STATE_FULLSCREEN" + "_NET_WM_STATE_FULLSCREEN", "_NET_WM_PING", "_NET_WM_PID", "WM_CLIENT_MACHINE" diff --git a/src/window.c b/src/window.c index a2fdb9f95..b068f893b 100644 --- a/src/window.c +++ b/src/window.c @@ -4606,7 +4606,7 @@ recalc_window_features (MetaWindow *window) window->has_move_func = FALSE; window->has_resize_func = FALSE; } - + if (window->type != META_WINDOW_NORMAL) { window->has_minimize_func = FALSE; @@ -4614,6 +4614,17 @@ recalc_window_features (MetaWindow *window) window->has_fullscreen_func = FALSE; } + /* We leave fullscreen windows decorated, just push the frame outside + * the screen. This avoids flickering to unparent them. + */ + if (window->fullscreen) + { + window->has_shade_func = FALSE; + window->has_move_func = FALSE; + window->has_resize_func = FALSE; + window->has_maximize_func = FALSE; + } + /* If min_size == max_size, then don't allow resize */ if (window->size_hints.min_width == window->size_hints.max_width && window->size_hints.min_height == window->size_hints.max_height) @@ -4684,7 +4695,7 @@ constrain_size (MetaWindow *window, maxw = window->size_hints.max_width; maxh = window->size_hints.max_height; - if (window->maximized) + if (window->maximized || window->fullscreen) { maxw = MIN (maxw, fullw); maxh = MIN (maxh, fullh); @@ -4701,7 +4712,7 @@ constrain_size (MetaWindow *window, if (maxh < minh) maxh = minh; - if (window->maximized) + if (window->maximized || window->fullscreen) { minw = MAX (minw, fullw); minh = MAX (minh, fullh);