summaryrefslogtreecommitdiff
path: root/src/wnck.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/wnck.c')
-rw-r--r--src/wnck.c72
1 files changed, 42 insertions, 30 deletions
diff --git a/src/wnck.c b/src/wnck.c
index 0b4d8ef..a42ccc1 100644
--- a/src/wnck.c
+++ b/src/wnck.c
@@ -513,8 +513,14 @@ active_window_changed (WnckScreen *screen)
}
}
-
- update_window_decoration_size (d->win);
+ /* We need to update the decoration size here
+ * since the shadow size might have changed and
+ * in that case the decoration will be redrawn,
+ * however if the shadow size doesn't change
+ * then we need to redraw the decoration anyways
+ * since the image would have changed */
+ if (!update_window_decoration_size (d->win))
+ queue_decor_draw (d);
}
}
@@ -525,51 +531,57 @@ active_window_changed (WnckScreen *screen)
if (d && d->pixmap)
{
d->active = wnck_window_is_active (win);
- queue_decor_draw (d);
- }
- if ((d->state & META_MAXIMIZED) == META_MAXIMIZED)
- {
- if (!d->frame_window)
+ if ((d->state & META_MAXIMIZED) == META_MAXIMIZED)
{
- if (d->active)
+ if (!d->frame_window)
{
- d->context = &max_window_active_context;
- d->shadow = max_border_active_shadow;
+ if (d->active)
+ {
+ d->context = &max_window_active_context;
+ d->shadow = max_border_active_shadow;
+ }
+ else
+ {
+ d->context = &max_window_inactive_context;
+ d->shadow = max_border_inactive_shadow;
+ }
}
else
{
- d->context = &max_window_inactive_context;
- d->shadow = max_border_inactive_shadow;
+ d->shadow = max_border_no_shadow;
}
}
else
{
- d->shadow = max_border_no_shadow;
- }
- }
- else
- {
- if (!d->frame_window)
- {
- if (d->active)
+ if (!d->frame_window)
{
- d->context = &window_active_context;
- d->shadow = border_active_shadow;
+ if (d->active)
+ {
+ d->context = &window_active_context;
+ d->shadow = border_active_shadow;
+ }
+ else
+ {
+ d->context = &window_inactive_context;
+ d->shadow = border_inactive_shadow;
+ }
}
else
{
- d->context = &window_inactive_context;
- d->shadow = border_inactive_shadow;
+ d->shadow = border_no_shadow;
}
}
- else
- {
- d->shadow = border_no_shadow;
- }
- }
- update_window_decoration_size (d->win);
+ /* We need to update the decoration size here
+ * since the shadow size might have changed and
+ * in that case the decoration will be redrawn,
+ * however if the shadow size doesn't change
+ * then we need to redraw the decoration anyways
+ * since the image would have changed */
+ if (!update_window_decoration_size (d->win))
+ queue_decor_draw (d);
+ }
}
}