When testing for shadow, test for window shape before override redirect.
This commit is contained in:
parent
33ae559eca
commit
c58ade6600
@ -626,19 +626,11 @@ meta_comp_window_has_shadow (MetaCompWindow *self)
|
|||||||
*/
|
*/
|
||||||
if (priv->argb32 || priv->opacity != 0xff)
|
if (priv->argb32 || priv->opacity != 0xff)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has no shadow as it is ARGB\n");
|
meta_verbose ("Window 0x%x has no shadow as it is ARGB\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Add shadows to override redirect windows (e.g., Gtk menus).
|
|
||||||
*/
|
|
||||||
if (priv->attrs.override_redirect)
|
|
||||||
{
|
|
||||||
meta_verbose ("Window has shadow because it is override redirect.\n");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Always put a shadow around windows with a frame - This should override
|
* Always put a shadow around windows with a frame - This should override
|
||||||
* the restriction about not putting a shadow around shaped windows
|
* the restriction about not putting a shadow around shaped windows
|
||||||
@ -648,7 +640,8 @@ meta_comp_window_has_shadow (MetaCompWindow *self)
|
|||||||
{
|
{
|
||||||
if (meta_window_get_frame (priv->window))
|
if (meta_window_get_frame (priv->window))
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has shadow because it has a frame\n");
|
meta_verbose ("Window 0x%x has shadow because it has a frame\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -658,17 +651,30 @@ meta_comp_window_has_shadow (MetaCompWindow *self)
|
|||||||
*/
|
*/
|
||||||
if (priv->shaped)
|
if (priv->shaped)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has no shadow as it is shaped\n");
|
meta_verbose ("Window 0x%x has no shadow as it is shaped\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add shadows to override redirect windows (e.g., Gtk menus).
|
||||||
|
* This must have lower priority than window shape test.
|
||||||
|
*/
|
||||||
|
if (priv->attrs.override_redirect)
|
||||||
|
{
|
||||||
|
meta_verbose ("Window 0x%x has shadow because it is override redirect.\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Don't put shadow around DND icon windows
|
* Don't put shadow around DND icon windows
|
||||||
*/
|
*/
|
||||||
if (priv->type == META_COMP_WINDOW_DND ||
|
if (priv->type == META_COMP_WINDOW_DND ||
|
||||||
priv->type == META_COMP_WINDOW_DESKTOP)
|
priv->type == META_COMP_WINDOW_DESKTOP)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has no shadow as it is DND or Desktop\n");
|
meta_verbose ("Window 0x%x has no shadow as it is DND or Desktop\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,19 +684,22 @@ meta_comp_window_has_shadow (MetaCompWindow *self)
|
|||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has shadow as it is a menu\n");
|
meta_verbose ("Window 0x%x has shadow as it is a menu\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
if (priv->type == META_COMP_WINDOW_TOOLTIP)
|
if (priv->type == META_COMP_WINDOW_TOOLTIP)
|
||||||
{
|
{
|
||||||
meta_verbose ("Window has shadow as it is a tooltip\n");
|
meta_verbose ("Window 0x%x has shadow as it is a tooltip\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
meta_verbose ("Window has no shadow as it fell through\n");
|
meta_verbose ("Window 0x%x has no shadow as it fell through\n",
|
||||||
|
(guint)priv->xwindow);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1434,15 +1443,15 @@ process_shape (MetaCompositorClutter *compositor,
|
|||||||
if (cw == NULL)
|
if (cw == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (event->kind == ShapeBounding)
|
if (event->kind == ShapeBounding)
|
||||||
{
|
{
|
||||||
if (!event->shaped && priv->shaped)
|
if (!event->shaped && priv->shaped)
|
||||||
priv->shaped = FALSE;
|
priv->shaped = FALSE;
|
||||||
|
|
||||||
resize_win (cw, priv->attrs.x, priv->attrs.y,
|
resize_win (cw, priv->attrs.x, priv->attrs.y,
|
||||||
event->width + event->x, event->height + event->y,
|
event->width + event->x, event->height + event->y,
|
||||||
priv->attrs.border_width, priv->attrs.override_redirect);
|
priv->attrs.border_width, priv->attrs.override_redirect);
|
||||||
|
|
||||||
if (event->shaped && !priv->shaped)
|
if (event->shaped && !priv->shaped)
|
||||||
priv->shaped = TRUE;
|
priv->shaped = TRUE;
|
||||||
|
|
||||||
@ -1817,7 +1826,7 @@ clutter_cmp_process_event (MetaCompositor *compositor,
|
|||||||
process_damage (xrc, (XDamageNotifyEvent *) event);
|
process_damage (xrc, (XDamageNotifyEvent *) event);
|
||||||
}
|
}
|
||||||
#ifdef HAVE_SHAPE
|
#ifdef HAVE_SHAPE
|
||||||
else if (event->type == meta_display_get_shape_event_base (xrc->display) + ShapeNotify)
|
else if (event->type == meta_display_get_shape_event_base (xrc->display) + ShapeNotify)
|
||||||
process_shape (xrc, (XShapeEvent *) event);
|
process_shape (xrc, (XShapeEvent *) event);
|
||||||
#endif /* HAVE_SHAPE */
|
#endif /* HAVE_SHAPE */
|
||||||
/* else
|
/* else
|
||||||
|
Loading…
Reference in New Issue
Block a user