Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 6 additions & 34 deletions src/compositor/meta-window-actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -756,67 +756,39 @@ meta_window_actor_has_shadow (MetaWindowActor *self)
if (priv->window)
{
if (meta_window_get_frame (priv->window))
{
meta_verbose ("Window 0x%x has shadow because it has a frame\n",
(guint)priv->xwindow);
return TRUE;
}
return TRUE;
}

/*
* Do not add shadows to ARGB windows; eventually we should generate a
* shadow from the input shape for such windows.
*/
if (priv->argb32 || priv->opacity != 0xff)
{
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->window->override_redirect)
{
meta_verbose ("Window 0x%x has shadow because it is override redirect.\n",
(guint)priv->xwindow);
return TRUE;
}

return TRUE;
/*
* Don't put shadow around DND icon windows
*/
if (window_type == META_WINDOW_DND ||
window_type == META_WINDOW_DESKTOP)
{
meta_verbose ("Window 0x%x has no shadow as it is DND or Desktop\n",
(guint)priv->xwindow);
return FALSE;
}
return FALSE;

if (window_type == META_WINDOW_MENU
#if 0
|| window_type == META_WINDOW_DROPDOWN_MENU
#endif
)
{
meta_verbose ("Window 0x%x has shadow as it is a menu\n",
(guint)priv->xwindow);
return TRUE;
}
return TRUE;

#if 0
if (window_type == META_WINDOW_TOOLTIP)
{
meta_verbose ("Window 0x%x has shadow as it is a tooltip\n",
(guint)priv->xwindow);
return TRUE;
}
return TRUE;
#endif

meta_verbose ("Window 0x%x has no shadow as it fell through\n",
(guint)priv->xwindow);
return FALSE;
}

Expand Down
5 changes: 3 additions & 2 deletions src/core/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -3654,8 +3654,9 @@ meta_window_tile (MetaWindow *window)
{
MetaMaximizeFlags directions;

/* Don't do anything if no tiling is requested */
if (window->tile_mode == META_TILE_NONE)
/* Don't do anything if no tiling is requested or we're already tiled */
if (window->tile_mode == META_TILE_NONE || window->maximized_vertically ||
window->maximized_horizontally )
return;

if (window->tile_mode == META_TILE_MAXIMIZED)
Expand Down