1607
1607
decor_shadow_t *
1608
meta_update_shadow (gint shadow_type)
1610
decor_shadow_options_t opt_active_shadow;
1611
decor_shadow_options_t opt_inactive_shadow;
1612
decor_shadow_options_t opt_no_shadow;
1613
Display *xdisplay = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
1614
GdkDisplay *display = gdk_display_get_default ();
1615
GdkScreen *screen = gdk_display_get_default_screen (display);
1617
opt_active_shadow.shadow_radius = shadow_radius;
1618
opt_active_shadow.shadow_opacity = shadow_opacity;
1620
memcpy (opt_active_shadow.shadow_color, shadow_color, sizeof (shadow_color));
1622
opt_active_shadow.shadow_offset_x = shadow_offset_x;
1623
opt_active_shadow.shadow_offset_y = shadow_offset_y;
1625
opt_inactive_shadow.shadow_radius = 8.0;
1626
opt_inactive_shadow.shadow_opacity = 0.5;
1628
opt_inactive_shadow.shadow_offset_x = 0;
1629
opt_inactive_shadow.shadow_offset_y = 0;
1631
memcpy (opt_inactive_shadow.shadow_color, shadow_color, sizeof (shadow_color));
1633
switch (shadow_type)
1635
case SHADOW_TYPE_ACTIVE_NORMAL:
1636
return decor_shadow_create (xdisplay,
1637
gdk_x11_screen_get_xscreen (screen),
1641
_win_extents.top + titlebar_height,
1642
_win_extents.bottom,
1644
TRANSLUCENT_CORNER_SIZE,
1645
_win_extents.right -
1646
TRANSLUCENT_CORNER_SIZE,
1647
_win_extents.top + titlebar_height -
1648
TRANSLUCENT_CORNER_SIZE,
1649
_win_extents.bottom -
1650
TRANSLUCENT_CORNER_SIZE,
1652
&window_active_context,
1656
case SHADOW_TYPE_INACTIVE_NORMAL:
1657
return decor_shadow_create (xdisplay,
1658
gdk_x11_screen_get_xscreen (screen),
1662
_win_extents.top + titlebar_height,
1663
_win_extents.bottom,
1665
TRANSLUCENT_CORNER_SIZE,
1666
_win_extents.right -
1667
TRANSLUCENT_CORNER_SIZE,
1668
_win_extents.top + titlebar_height -
1669
TRANSLUCENT_CORNER_SIZE,
1670
_win_extents.bottom -
1671
TRANSLUCENT_CORNER_SIZE,
1672
&opt_inactive_shadow,
1673
&window_inactive_context,
1676
case SHADOW_TYPE_ACTIVE_MAX:
1677
return decor_shadow_create (xdisplay,
1678
gdk_x11_screen_get_xscreen (screen),
1680
_max_win_extents.left,
1681
_max_win_extents.right,
1682
_max_win_extents.top + max_titlebar_height,
1683
_max_win_extents.bottom,
1684
_max_win_extents.left - TRANSLUCENT_CORNER_SIZE,
1685
_max_win_extents.right - TRANSLUCENT_CORNER_SIZE,
1686
_max_win_extents.top + max_titlebar_height -
1687
TRANSLUCENT_CORNER_SIZE,
1688
_max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
1690
&max_window_active_context,
1693
case SHADOW_TYPE_INACTIVE_MAX:
1694
return decor_shadow_create (xdisplay,
1695
gdk_x11_screen_get_xscreen (screen),
1697
_max_win_extents.left,
1698
_max_win_extents.right,
1699
_max_win_extents.top + max_titlebar_height,
1700
_max_win_extents.bottom,
1701
_max_win_extents.left - TRANSLUCENT_CORNER_SIZE,
1702
_max_win_extents.right - TRANSLUCENT_CORNER_SIZE,
1703
_max_win_extents.top + max_titlebar_height -
1704
TRANSLUCENT_CORNER_SIZE,
1705
_max_win_extents.bottom - TRANSLUCENT_CORNER_SIZE,
1706
&opt_inactive_shadow,
1707
&max_window_active_context,
1608
1718
meta_get_shadow (decor_t *d, gint shadow_type)