diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/metacity.c | 24 | ||||
-rw-r--r-- | src/wnck.c | 19 |
2 files changed, 42 insertions, 1 deletions
diff --git a/src/metacity.c b/src/metacity.c index 1cdf246..2095619 100644 --- a/src/metacity.c +++ b/src/metacity.c @@ -482,8 +482,30 @@ meta_get_decoration_geometry (decor_t *d, if (d->actions & WNCK_WINDOW_ACTION_SHADE) *flags |= (MetaFrameFlags ) META_FRAME_ALLOWS_SHADE; - if (d->active || g_slist_length (d->transient_windows) > 1) + if (d->active) *flags |= (MetaFrameFlags ) META_FRAME_HAS_FOCUS; + else if (g_slist_length (d->transient_windows) > 1) + { + GSList *transient_windows = d->transient_windows; + + for (; transient_windows; + transient_windows = transient_windows->next) + { + if (!transient_windows->data) + continue; + + decor_t *d_transient = g_object_get_data (transient_windows->data, "decor"); + + if (d_transient) + { + if (d_transient->active) + { + *flags |= (MetaFrameFlags ) META_FRAME_HAS_FOCUS; + break; + } + } + } + } if ((d->state & META_MAXIMIZED) == META_MAXIMIZED) *flags |= (MetaFrameFlags ) META_FRAME_MAXIMIZED; @@ -539,6 +539,16 @@ active_window_changed (WnckScreen *screen) * since the image would have changed */ if (!update_window_decoration_size (d->win)) queue_decor_draw (d); + + /* Also update any parents of this window + * since they won't get a notification here + */ + if (d->transient_parent) + { + decor_t *d_parent = g_object_get_data (d->transient_parent, "decor"); + queue_decor_draw (d_parent); + } + } } @@ -599,6 +609,15 @@ active_window_changed (WnckScreen *screen) * since the image would have changed */ if (!update_window_decoration_size (d->win)) queue_decor_draw (d); + + /* Also update any parents of this window + * since they won't get a notification here + */ + if (d->transient_parent) + { + decor_t *d_parent = g_object_get_data (d->transient_parent, "decor"); + queue_decor_draw (d_parent); + } } } } |