[mutter] window-actor: Use meta_window_is_monitor_sized
- From: Adel Gadllah <agadllah src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window-actor: Use meta_window_is_monitor_sized
- Date: Sun, 17 Feb 2013 20:42:26 +0000 (UTC)
commit 034ab77c309fadad656e7eaab4276f822747af65
Author: Adel Gadllah <adel gadllah gmail com>
Date: Sun Feb 17 21:18:44 2013 +0100
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 files changed, 1 insertions(+), 29 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 09c88a1..53987e2 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))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]