summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <sam.spilsbury@canonical.com>2011-01-30 10:12:40 +0800
committerSam Spilsbury <sam.spilsbury@canonical.com>2011-01-30 10:12:40 +0800
commitb406f56e2e123391fe12a32bc5758ea27dde5f21 (patch)
treebc6c28b477ec993af6696114ac1d9c61d0fd4eec
parent7973b3215601c71cf01a04ea4de0ceae341b76ea (diff)
downloadunity-window-decorator-b406f56e2e123391fe12a32bc5758ea27dde5f21.tar.gz
unity-window-decorator-b406f56e2e123391fe12a32bc5758ea27dde5f21.tar.bz2
Redraw decoration even if the size update failed. Fixes LP #704413
-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);
+ }
}
}