Merge lp:~3v1n0/unity/alpha-windows-shadows-fix into lp:unity

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: 3784
Proposed branch: lp:~3v1n0/unity/alpha-windows-shadows-fix
Merge into: lp:unity
Diff against target: 41 lines (+11/-2)
2 files modified
unity-shared/CompizUtils.cpp (+10/-2)
unity-shared/CompizUtils.h (+1/-0)
To merge this branch: bzr merge lp:~3v1n0/unity/alpha-windows-shadows-fix
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Unity Team Pending
Review via email: mp+215674@code.launchpad.net

Commit message

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.

This fixes, between the others, the unity force-quit dialog.

Description of the change

Reproposing the fix, as it got lost in revision 3775, due to a merge error.
It affects the unity force-quit dialogs.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'unity-shared/CompizUtils.cpp'
2--- unity-shared/CompizUtils.cpp 2014-04-01 18:38:30 +0000
3+++ unity-shared/CompizUtils.cpp 2014-04-14 13:54:13 +0000
4@@ -180,8 +180,8 @@
5 if (win->region().numRects() != 1) // Non rectangular windows
6 return false;
7
8- if (win->overrideRedirect() && win->alpha())
9- return false;
10+ if (win->alpha())
11+ return WindowHasMotifDecorations(win);
12
13 return true;
14 }
15@@ -194,6 +194,14 @@
16 if (!IsWindowShadowDecorable(win))
17 return false;
18
19+ return WindowHasMotifDecorations(win);
20+}
21+
22+bool WindowHasMotifDecorations(CompWindow* win)
23+{
24+ if (!win)
25+ return false;
26+
27 if (win->overrideRedirect())
28 return false;
29
30
31=== modified file 'unity-shared/CompizUtils.h'
32--- unity-shared/CompizUtils.h 2014-04-01 18:38:30 +0000
33+++ unity-shared/CompizUtils.h 2014-04-14 13:54:13 +0000
34@@ -113,6 +113,7 @@
35
36 bool IsWindowShadowDecorable(CompWindow*);
37 bool IsWindowFullyDecorable(CompWindow*);
38+bool WindowHasMotifDecorations(CompWindow*);
39
40 } // compiz_utils namespace
41 } // unity namespace