window-actor: Use meta_window_is_monitor_sized
Use meta_window_is_monitor_sized in should_unredirect instead of doing the checks directly.
This commit is contained in:
parent
a6a9d3f448
commit
034ab77c30
@ -1238,8 +1238,6 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
|
|||||||
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
MetaWindow *metaWindow = meta_window_actor_get_meta_window (self);
|
||||||
MetaWindowActorPrivate *priv = self->priv;
|
MetaWindowActorPrivate *priv = self->priv;
|
||||||
|
|
||||||
gboolean occupies_full_monitors = FALSE;
|
|
||||||
|
|
||||||
if (meta_window_requested_dont_bypass_compositor (metaWindow))
|
if (meta_window_requested_dont_bypass_compositor (metaWindow))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
@ -1252,33 +1250,7 @@ meta_window_actor_should_unredirect (MetaWindowActor *self)
|
|||||||
if (priv->argb32 && !meta_window_requested_bypass_compositor (metaWindow))
|
if (priv->argb32 && !meta_window_requested_bypass_compositor (metaWindow))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (meta_window_is_fullscreen (metaWindow))
|
if (!meta_window_is_monitor_sized (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)
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (meta_window_requested_bypass_compositor (metaWindow))
|
if (meta_window_requested_bypass_compositor (metaWindow))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user