diff options
| author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2014-04-02 11:02:53 +0000 |
|---|---|---|
| committer | CI bot <ps-jenkins@lists.canonical.com> | 2014-04-02 11:02:53 +0000 |
| commit | beb3497fabb724c203aaf5257a835b69761c1709 (patch) | |
| tree | c235fd40d57b640ac97a8fc43cebd48770875c62 | |
| parent | 34e4bebb1b12317ba685f582bb693661f2629330 (diff) | |
| parent | 14ff53b133eff86a0aa472024db1d8ebb6ca108c (diff) | |
CompizUtils: only shadow-decorate alpha windows that have full decorations as well
Since alpha windows might have custom shapes, it's safer not to shadow-decorate them unless they don't provide, for sure, a full decoration. Fixes: 1281825 (bzr r3749)
| -rw-r--r-- | unity-shared/CompizUtils.cpp | 12 | ||||
| -rw-r--r-- | unity-shared/CompizUtils.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/unity-shared/CompizUtils.cpp b/unity-shared/CompizUtils.cpp index 6084386f8..be197c73e 100644 --- a/unity-shared/CompizUtils.cpp +++ b/unity-shared/CompizUtils.cpp @@ -180,8 +180,8 @@ bool IsWindowShadowDecorable(CompWindow* win) if (win->region().numRects() != 1) // Non rectangular windows return false; - if (win->overrideRedirect() && win->alpha()) - return false; + if (win->alpha()) + return WindowHasMotifDecorations(win); return true; } @@ -194,6 +194,14 @@ bool IsWindowFullyDecorable(CompWindow* win) if (!IsWindowShadowDecorable(win)) return false; + return WindowHasMotifDecorations(win); +} + +bool WindowHasMotifDecorations(CompWindow* win) +{ + if (!win) + return false; + if (win->overrideRedirect()) return false; diff --git a/unity-shared/CompizUtils.h b/unity-shared/CompizUtils.h index 3f66d7e9b..bab45a532 100644 --- a/unity-shared/CompizUtils.h +++ b/unity-shared/CompizUtils.h @@ -113,6 +113,7 @@ private: bool IsWindowShadowDecorable(CompWindow*); bool IsWindowFullyDecorable(CompWindow*); +bool WindowHasMotifDecorations(CompWindow*); } // compiz_utils namespace } // unity namespace |
