summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2010-12-09 19:36:09 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2010-12-09 19:36:09 +0800
commit313de06d8a052568cbf838d8c212cd7942637fed (patch)
tree9a8ce00f341b4639e0338498d19186ad8f4928c1 /src
parente378acbe31a3e27f813e1e822c152c543069ba08 (diff)
downloadunity-window-decorator-313de06d8a052568cbf838d8c212cd7942637fed.tar.gz
unity-window-decorator-313de06d8a052568cbf838d8c212cd7942637fed.tar.bz2
Expand shadows to allow for active and inactive shadows.
Currenty only does active shadows
Diffstat (limited to 'src')
-rw-r--r--src/cairo.c2
-rw-r--r--src/decorator.c22
-rw-r--r--src/gtk-window-decorator.c8
-rw-r--r--src/gtk-window-decorator.h10
-rw-r--r--src/metacity.c6
5 files changed, 26 insertions, 22 deletions
diff --git a/src/cairo.c b/src/cairo.c
index a9b8f42..ffd8388 100644
--- a/src/cairo.c
+++ b/src/cairo.c
@@ -749,7 +749,7 @@ calc_decoration_size (decor_t *d,
d->border_layout = layout;
d->context = &window_context;
- d->shadow = border_shadow;
+ d->shadow = border_active_shadow;
return TRUE;
}
diff --git a/src/decorator.c b/src/decorator.c
index 68eb22f..9c08472 100644
--- a/src/decorator.c
+++ b/src/decorator.c
@@ -507,13 +507,13 @@ update_shadow (void)
decor_draw_simple,
0);
- if (border_shadow)
+ if (border_active_shadow)
{
- decor_shadow_destroy (xdisplay, border_shadow);
- border_shadow = NULL;
+ decor_shadow_destroy (xdisplay, border_active_shadow);
+ border_active_shadow = NULL;
}
- border_shadow = decor_shadow_create (xdisplay,
+ border_active_shadow = decor_shadow_create (xdisplay,
gdk_x11_screen_get_xscreen (screen),
1, 1,
_win_extents.left,
@@ -562,13 +562,13 @@ update_shadow (void)
decor_context_t *context = &window_context_no_shadow;
- if (max_border_shadow)
+ if (max_border_active_shadow)
{
- decor_shadow_destroy (xdisplay, max_border_shadow);
- max_border_shadow = NULL;
+ decor_shadow_destroy (xdisplay, max_border_active_shadow);
+ max_border_active_shadow = NULL;
}
- max_border_shadow =
+ max_border_active_shadow =
decor_shadow_create (xdisplay,
gdk_x11_screen_get_xscreen (screen),
1, 1,
@@ -588,8 +588,8 @@ update_shadow (void)
if (max_border_no_shadow)
{
- decor_shadow_destroy (xdisplay, max_border_shadow);
- max_border_shadow = NULL;
+ decor_shadow_destroy (xdisplay, max_border_active_shadow);
+ max_border_active_shadow = NULL;
}
max_border_no_shadow =
@@ -787,7 +787,7 @@ update_default_decorations (GdkScreen *screen)
memset (&d, 0, sizeof (d));
d.context = &window_context;
- d.shadow = border_shadow;
+ d.shadow = border_active_shadow;
d.layout = pango_layout_new (pango_context);
decor_get_default_layout (d.context, 1, 1, &d.border_layout);
diff --git a/src/gtk-window-decorator.c b/src/gtk-window-decorator.c
index bde881a..32c5382 100644
--- a/src/gtk-window-decorator.c
+++ b/src/gtk-window-decorator.c
@@ -85,8 +85,10 @@ gint shadow_offset_y = SHADOW_OFFSET_Y;
guint cmdline_options = 0;
decor_shadow_t *no_border_shadow = NULL;
-decor_shadow_t *border_shadow = NULL;
-decor_shadow_t *max_border_shadow = NULL;
+decor_shadow_t *border_active_shadow = NULL;
+decor_shadow_t *border_inactive_shadow = NULL;
+decor_shadow_t *max_border_active_shadow = NULL;
+decor_shadow_t *max_border_inactive_shadow = NULL;
decor_shadow_t *border_no_shadow = NULL;
decor_shadow_t *max_border_no_shadow = NULL;
decor_shadow_t *switcher_shadow = NULL;
@@ -313,7 +315,7 @@ main (int argc, char *argv[])
switcher_fg_atom = XInternAtom (xdisplay,
DECOR_SWITCH_FOREGROUND_COLOR_ATOM_NAME,
FALSE);
-
+
compiz_shadow_info_atom = XInternAtom (xdisplay, "_COMPIZ_NET_CM_SHADOW_PROPERTIES", FALSE);
compiz_shadow_color_atom = XInternAtom (xdisplay, "_COMPIZ_NET_CM_SHADOW_COLOR", FALSE);
diff --git a/src/gtk-window-decorator.h b/src/gtk-window-decorator.h
index 37fe299..57f1f28 100644
--- a/src/gtk-window-decorator.h
+++ b/src/gtk-window-decorator.h
@@ -71,7 +71,7 @@
#define COMPIZ_USE_SYSTEM_FONT_KEY \
METACITY_GCONF_DIR "/titlebar_uses_system_font"
-
+
#define COMPIZ_TITLEBAR_FONT_KEY \
METACITY_GCONF_DIR "/titlebar_font"
@@ -259,9 +259,11 @@ extern MetaButtonLayout meta_button_layout;
extern guint cmdline_options;
extern decor_shadow_t *no_border_shadow;
-extern decor_shadow_t *border_shadow;
+extern decor_shadow_t *border_active_shadow;
+extern decor_shadow_t *border_inactive_shadow;
extern decor_shadow_t *border_no_shadow;
-extern decor_shadow_t *max_border_shadow;
+extern decor_shadow_t *max_border_active_shadow;
+extern decor_shadow_t *max_border_inactive_shadow;
extern decor_shadow_t *max_border_no_shadow;
extern decor_shadow_t *switcher_shadow;
@@ -509,7 +511,7 @@ queue_decor_draw (decor_t *d);
void
copy_to_front_buffer (decor_t *d);
-
+
/* wnck.c*/
diff --git a/src/metacity.c b/src/metacity.c
index bbef354..26935b7 100644
--- a/src/metacity.c
+++ b/src/metacity.c
@@ -549,7 +549,7 @@ meta_draw_window_decoration (decor_t *d)
if (d->frame_window)
{
GdkColormap *cmap;
-
+
cmap = get_colormap_for_drawable (GDK_DRAWABLE (d->pixmap));
gdk_drawable_set_colormap (GDK_DRAWABLE (d->pixmap), cmap);
gdk_drawable_set_colormap (GDK_DRAWABLE (d->buffer_pixmap), cmap);
@@ -1081,7 +1081,7 @@ meta_calc_decoration_size (decor_t *d,
if (!d->frame_window)
{
context = &max_window_context;
- shadow = max_border_shadow;
+ shadow = max_border_active_shadow;
}
else
{
@@ -1094,7 +1094,7 @@ meta_calc_decoration_size (decor_t *d,
if (!d->frame_window)
{
context = &window_context;
- shadow = border_shadow;
+ shadow = border_active_shadow;
}
else
{