From 034ab77c309fadad656e7eaab4276f822747af65 Mon Sep 17 00:00:00 2001 From: Adel Gadllah Date: Sun, 17 Feb 2013 21:18:44 +0100 Subject: [PATCH] window-actor: Use meta_window_is_monitor_sized Use meta_window_is_monitor_sized in should_unredirect instead of doing the checks directly. --- src/compositor/meta-window-actor.c | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c index 09c88a131..53987e2ea 100644 --- a/src/compositor/meta-window-actor.c +++ b/src/compositor/meta-window-actor.c @@ -1238,8 +1238,6 @@ meta_window_actor_should_unredirect (MetaWindowActor *self) MetaWindow *metaWindow = meta_window_actor_get_meta_window (self); MetaWindowActorPrivate *priv = self->priv; - gboolean occupies_full_monitors = FALSE; - if (meta_window_requested_dont_bypass_compositor (metaWindow)) return FALSE; @@ -1252,33 +1250,7 @@ meta_window_actor_should_unredirect (MetaWindowActor *self) if (priv->argb32 && !meta_window_requested_bypass_compositor (metaWindow)) return FALSE; - if (meta_window_is_fullscreen (metaWindow)) - occupies_full_monitors = TRUE; - else if (meta_window_is_override_redirect (metaWindow)) - { - MetaScreen *screen = meta_window_get_screen (metaWindow); - MetaRectangle window_rect, monitor_rect; - - int num_monitors = meta_screen_get_n_monitors (screen); - int screen_width, screen_height, i; - - meta_screen_get_size (screen, &screen_width, &screen_height); - meta_window_get_outer_rect (priv->window, &window_rect); - - if (window_rect.x == 0 && window_rect.y == 0 && - window_rect.width == screen_width && window_rect.height == screen_height) - occupies_full_monitors = TRUE; - - for (i = 0; i < num_monitors; i++) - { - meta_screen_get_monitor_geometry (screen , i, &monitor_rect); - if (monitor_rect.x == window_rect.x && monitor_rect.y == window_rect.y && - monitor_rect.width == window_rect.width && monitor_rect.height == window_rect.height) - occupies_full_monitors = TRUE; - } - } - - if (!occupies_full_monitors) + if (!meta_window_is_monitor_sized (metaWindow)) return FALSE; if (meta_window_requested_bypass_compositor (metaWindow))