diff options
author | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-01-30 10:12:40 +0800 |
---|---|---|
committer | Sam Spilsbury <sam.spilsbury@canonical.com> | 2011-01-30 10:12:40 +0800 |
commit | b406f56e2e123391fe12a32bc5758ea27dde5f21 (patch) | |
tree | bc6c28b477ec993af6696114ac1d9c61d0fd4eec /src | |
parent | 7973b3215601c71cf01a04ea4de0ceae341b76ea (diff) | |
download | unity-window-decorator-b406f56e2e123391fe12a32bc5758ea27dde5f21.tar.gz unity-window-decorator-b406f56e2e123391fe12a32bc5758ea27dde5f21.tar.bz2 |
Redraw decoration even if the size update failed. Fixes LP #704413
Diffstat (limited to 'src')
-rw-r--r-- | src/wnck.c | 72 |
1 files changed, 42 insertions, 30 deletions
@@ -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); + } } } |