Merge lp:~timo-jyrinki/unity/ubuntu.5200 into lp:~ubuntu-desktop/unity/precise
- ubuntu.5200
- Merge into precise
Proposed by
Timo Jyrinki
Status: | Merged |
---|---|
Merged at revision: | 715 |
Proposed branch: | lp:~timo-jyrinki/unity/ubuntu.5200 |
Merge into: | lp:~ubuntu-desktop/unity/precise |
Diff against target: |
762 lines (+265/-104) 16 files modified
AUTHORS (+1/-0) CMakeLists.txt (+1/-1) ChangeLog (+72/-0) debian/changelog (+17/-0) manual-tests/WindowButtons.txt (+14/-0) plugins/unityshell/src/LauncherController.cpp (+1/-1) plugins/unityshell/src/PanelMenuView.cpp (+3/-3) plugins/unityshell/src/PluginAdapter.cpp (+91/-29) plugins/unityshell/src/PluginAdapter.h (+6/-2) plugins/unityshell/src/ResultRendererTile.cpp (+26/-24) plugins/unityshell/src/WindowManager.cpp (+5/-0) plugins/unityshell/src/WindowManager.h (+1/-0) plugins/unityshell/src/unityshell.cpp (+16/-28) plugins/unityshell/src/unityshell.h (+1/-1) tests/test_launcher_controller.cpp (+10/-0) tests/test_service_lens.c (+0/-15) |
To merge this branch: | bzr merge lp:~timo-jyrinki/unity/ubuntu.5200 |
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Didier Roche-Tolomelli | Approve | ||
Review via email: mp+162778@code.launchpad.net |
Commit message
* New upstream release.
- ResultRendererTile: fix a crash if row.renderer<
is null (LP: #926658)
- Fix unity launcher vanishes when switching to mirrored displays
(LP: #991637)
- Fix window decorations being drawn when they should not be.
This fixes icaclient window "dancing" (LP: #1083186) and
hides decoration in a test case with Steam (LP: #1122478)
- [multimonitor] Dash - Opening dash or HUD on one screen removes panel
shadow on the other (LP: #892718)
- Press Alt+F1, panel’s shadow dissapear (LP: #942965)
* Cherry-pick a manual test for decorations fix
Description of the change
For didrocks.
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'AUTHORS' | |||
2 | --- AUTHORS 2012-11-12 12:20:38 +0000 | |||
3 | +++ AUTHORS 2013-05-07 13:13:46 +0000 | |||
4 | @@ -114,6 +114,7 @@ | |||
5 | 114 | Thomi Richards <thomi.richards@canonical.com>, Ted Gould <ted@gould.cx> | 114 | Thomi Richards <thomi.richards@canonical.com>, Ted Gould <ted@gould.cx> |
6 | 115 | Thomi Richards <thomi.richards@canonical.com>, Thomi Richards <thomir@gmail.com> | 115 | Thomi Richards <thomi.richards@canonical.com>, Thomi Richards <thomir@gmail.com> |
7 | 116 | Thomi Richards <thomi.richards@canonical.com>, Tim Penhey <tim.penhey@canonical.com> | 116 | Thomi Richards <thomi.richards@canonical.com>, Tim Penhey <tim.penhey@canonical.com> |
8 | 117 | Timo Jyrinki <timo.jyrinki@canonical.com> | ||
9 | 117 | Tim Penhey <tim.penhey@canonical.com> | 118 | Tim Penhey <tim.penhey@canonical.com> |
10 | 118 | Tim Penhey <tim.penhey@canonical.com>, Gordon Allott <gord.allott@canonical.com> | 119 | Tim Penhey <tim.penhey@canonical.com>, Gordon Allott <gord.allott@canonical.com> |
11 | 119 | Tim Penhey <tim.penhey@canonical.com>, Jason Smith <jason.smith@canonical.com> | 120 | Tim Penhey <tim.penhey@canonical.com>, Jason Smith <jason.smith@canonical.com> |
12 | 120 | 121 | ||
13 | === modified file 'CMakeLists.txt' | |||
14 | --- CMakeLists.txt 2012-11-12 12:20:38 +0000 | |||
15 | +++ CMakeLists.txt 2013-05-07 13:13:46 +0000 | |||
16 | @@ -8,7 +8,7 @@ | |||
17 | 8 | # | 8 | # |
18 | 9 | set (PROJECT_NAME "unity") | 9 | set (PROJECT_NAME "unity") |
19 | 10 | set (UNITY_MAJOR 5) | 10 | set (UNITY_MAJOR 5) |
21 | 11 | set (UNITY_MINOR 18) | 11 | set (UNITY_MINOR 20) |
22 | 12 | set (UNITY_MICRO 0) | 12 | set (UNITY_MICRO 0) |
23 | 13 | set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") | 13 | set (UNITY_VERSION "${UNITY_MAJOR}.${UNITY_MINOR}.${UNITY_MICRO}") |
24 | 14 | set (UNITY_API_VERSION "5.0") | 14 | set (UNITY_API_VERSION "5.0") |
25 | 15 | 15 | ||
26 | === modified file 'ChangeLog' | |||
27 | --- ChangeLog 2012-11-12 12:20:38 +0000 | |||
28 | +++ ChangeLog 2013-05-07 13:13:46 +0000 | |||
29 | @@ -1,3 +1,75 @@ | |||
30 | 1 | 2013-04-04 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
31 | 2 | |||
32 | 3 | UnityWindow: properly draw the panel shadow when a Nux window is focused or during WS switch | ||
33 | 4 | |||
34 | 5 | If a nux window is the active one, compiz won't draw it, so the code that is doing the | ||
35 | 6 | panelShadow drawing is excluded. We need to make sure that this will be executed | ||
36 | 7 | also in this case. | ||
37 | 8 | |||
38 | 9 | 2013-04-04 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
39 | 10 | |||
40 | 11 | UnityShell: paint the panel shadow only if we don't have a mask set | ||
41 | 12 | |||
42 | 13 | 2013-04-04 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
43 | 14 | |||
44 | 15 | UnityWindow: properly draw the panel shadow when a Nux window is focused or during WS switch | ||
45 | 16 | |||
46 | 17 | If a nux window is the active one, compiz won't draw it, so the code that is doing the panelShadow drawing is excluded. We need to make sure that this will be executed also in this case. | ||
47 | 18 | |||
48 | 19 | 2013-04-03 Łukasz 'sil2100' Zemczak <lukasz.zemczak@canonical.com> | ||
49 | 20 | |||
50 | 21 | Partial backport of Unity trunk revno. 2901 to fix where window decorations are being drawn when they should not be (LP: #1122478) (LP: #1083186). | ||
51 | 22 | |||
52 | 23 | 2013-03-18 Chris Townsend <christopher.townsend@canonical.com> | ||
53 | 24 | |||
54 | 25 | Fix issue whare a window created without decorations would have decorations when maximizing and minimizing the window very quicly. This fix was taken from upstream Unity. | ||
55 | 26 | |||
56 | 27 | 2013-02-18 Andrea Azzarone <azzaronea@gmail.com> | ||
57 | 28 | |||
58 | 29 | Backport fix for 991637. | ||
59 | 30 | |||
60 | 31 | Merged branch lp:~andyrock/unity/fix-991637-5.0 | ||
61 | 32 | |||
62 | 33 | 2013-02-14 Andrea Azzarone <azzaronea@gmail.com> | ||
63 | 34 | |||
64 | 35 | Backport fix for 991637. | ||
65 | 36 | |||
66 | 37 | 2013-01-31 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
67 | 38 | |||
68 | 39 | ResultRendererTile: fix a crash if row.renderer<TextureContainer*>() is null | ||
69 | 40 | |||
70 | 41 | 2013-01-30 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
71 | 42 | |||
72 | 43 | test_service_lens: 12.04 has not preview support, fix compilation | ||
73 | 44 | |||
74 | 45 | 2013-01-30 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
75 | 46 | |||
76 | 47 | ResultRendererTile: Fix compilation issue. | ||
77 | 48 | |||
78 | 49 | 2013-01-30 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
79 | 50 | |||
80 | 51 | merging with lp:unity/5.0 | ||
81 | 52 | |||
82 | 53 | 2012-07-21 Marco Trevisan (Treviño) <mail@3v1n0.net> | ||
83 | 54 | |||
84 | 55 | ResultRendererTile: don't crash in LoadIcon if row.renderer<TextureContainer*>() is null | ||
85 | 56 | |||
86 | 57 | 2012-12-05 Brandon Schaefer <brandon.schaefer@canonical.com> | ||
87 | 58 | |||
88 | 59 | Change TimeUtil to use int64, so the buffer wont overflow within our lifetimes.. Fixes: https://bugs.launchpad.net/bugs/806248. Approved by Łukasz Zemczak. | ||
89 | 60 | |||
90 | 61 | 2012-12-05 Brandon Schaefer <brandon.schaefer@canonical.com> | ||
91 | 62 | |||
92 | 63 | * Fix header | ||
93 | 64 | |||
94 | 65 | 2012-12-03 Brandon Schaefer <brandon.schaefer@canonical.com> | ||
95 | 66 | |||
96 | 67 | * Fix TimeUtil and int32 buffer overflow, now uses an int64 | ||
97 | 68 | |||
98 | 69 | 2012-11-12 Timo Jyrinki <timo.jyrinki@canonical.com> | ||
99 | 70 | |||
100 | 71 | Release\ 5.18.0 | ||
101 | 72 | |||
102 | 1 | 2012-10-18 Andrea Azzarone <azzaronea@gmail.com> | 73 | 2012-10-18 Andrea Azzarone <azzaronea@gmail.com> |
103 | 2 | 74 | ||
104 | 3 | Use linear filtering to draw icons (when needed).. Fixes: https://bugs.launchpad.net/bugs/1036231. Approved by Marco Trevisan (Treviño). | 75 | Use linear filtering to draw icons (when needed).. Fixes: https://bugs.launchpad.net/bugs/1036231. Approved by Marco Trevisan (Treviño). |
105 | 4 | 76 | ||
106 | === modified file 'debian/changelog' | |||
107 | --- debian/changelog 2013-01-28 13:01:55 +0000 | |||
108 | +++ debian/changelog 2013-05-07 13:13:46 +0000 | |||
109 | @@ -1,3 +1,20 @@ | |||
110 | 1 | unity (5.20.0-0ubuntu1) UNRELEASED; urgency=low | ||
111 | 2 | |||
112 | 3 | * New upstream release. | ||
113 | 4 | - ResultRendererTile: fix a crash if row.renderer<TextureContainer*>() | ||
114 | 5 | is null (LP: #926658) | ||
115 | 6 | - Fix unity launcher vanishes when switching to mirrored displays | ||
116 | 7 | (LP: #991637) | ||
117 | 8 | - Fix window decorations being drawn when they should not be. | ||
118 | 9 | This fixes icaclient window "dancing" (LP: #1083186) and | ||
119 | 10 | hides decoration in a test case with Steam (LP: #1122478) | ||
120 | 11 | - [multimonitor] Dash - Opening dash or HUD on one screen removes panel | ||
121 | 12 | shadow on the other (LP: #892718) | ||
122 | 13 | - Press Alt+F1, panel’s shadow dissapear (LP: #942965) | ||
123 | 14 | * Cherry-pick a manual test for decorations fix | ||
124 | 15 | |||
125 | 16 | -- Timo Jyrinki <timo-jyrinki@ubuntu.com> Fri, 12 Apr 2013 11:38:40 +0300 | ||
126 | 17 | |||
127 | 1 | unity (5.18.0-0ubuntu2) precise; urgency=low | 18 | unity (5.18.0-0ubuntu2) precise; urgency=low |
128 | 2 | 19 | ||
129 | 3 | [ Brandon Schaefer ] | 20 | [ Brandon Schaefer ] |
130 | 4 | 21 | ||
131 | === modified file 'manual-tests/WindowButtons.txt' | |||
132 | --- manual-tests/WindowButtons.txt 2012-04-13 22:03:13 +0000 | |||
133 | +++ manual-tests/WindowButtons.txt 2013-05-07 13:13:46 +0000 | |||
134 | @@ -9,3 +9,17 @@ | |||
135 | 9 | 9 | ||
136 | 10 | Expected Result: | 10 | Expected Result: |
137 | 11 | * The close window button should be shown as disabled (grayed) | 11 | * The close window button should be shown as disabled (grayed) |
138 | 12 | |||
139 | 13 | |||
140 | 14 | Custom window buttons and decorations always on desired windows | ||
141 | 15 | --------------------------------------------------------------- | ||
142 | 16 | |||
143 | 17 | Actions: | ||
144 | 18 | * Start Steam on Ubuntu | ||
145 | 19 | * Maximize the Steam window | ||
146 | 20 | * Minimize the Steam window | ||
147 | 21 | * Un-minimize the Steam window | ||
148 | 22 | * Restore the Steam window | ||
149 | 23 | |||
150 | 24 | Expected Result: | ||
151 | 25 | * Make sure that Steam does not have Ubuntu window decorations | ||
152 | 12 | 26 | ||
153 | === modified file 'plugins/unityshell/src/LauncherController.cpp' | |||
154 | --- plugins/unityshell/src/LauncherController.cpp 2012-09-11 10:38:44 +0000 | |||
155 | +++ plugins/unityshell/src/LauncherController.cpp 2013-05-07 13:13:46 +0000 | |||
156 | @@ -185,7 +185,7 @@ | |||
157 | 185 | launchers[i] = nux::ObjectPtr<Launcher>(CreateLauncher(i)); | 185 | launchers[i] = nux::ObjectPtr<Launcher>(CreateLauncher(i)); |
158 | 186 | } | 186 | } |
159 | 187 | 187 | ||
161 | 188 | int monitor = (num_launchers == 1) ? primary : i; | 188 | int monitor = (num_launchers == 1 && num_monitors > 1) ? primary : i; |
162 | 189 | 189 | ||
163 | 190 | if (launchers[i]->monitor() != monitor) | 190 | if (launchers[i]->monitor() != monitor) |
164 | 191 | { | 191 | { |
165 | 192 | 192 | ||
166 | === modified file 'plugins/unityshell/src/PanelMenuView.cpp' | |||
167 | --- plugins/unityshell/src/PanelMenuView.cpp 2012-04-27 11:42:56 +0000 | |||
168 | +++ plugins/unityshell/src/PanelMenuView.cpp 2013-05-07 13:13:46 +0000 | |||
169 | @@ -1083,7 +1083,7 @@ | |||
170 | 1083 | // if we've just started tracking this window and it is maximized, let's | 1083 | // if we've just started tracking this window and it is maximized, let's |
171 | 1084 | // make sure it's undecorated just in case it slipped by us earlier | 1084 | // make sure it's undecorated just in case it slipped by us earlier |
172 | 1085 | // (I'm looking at you, Chromium!) | 1085 | // (I'm looking at you, Chromium!) |
174 | 1086 | if (_is_maximized && wm->IsWindowDecorated(xid)) | 1086 | if (_is_maximized && wm->HasWindowDecorations(xid)) |
175 | 1087 | { | 1087 | { |
176 | 1088 | wm->Undecorate(xid); | 1088 | wm->Undecorate(xid); |
177 | 1089 | _maximized_set.insert(xid); | 1089 | _maximized_set.insert(xid); |
178 | @@ -1222,7 +1222,7 @@ | |||
179 | 1222 | } | 1222 | } |
180 | 1223 | 1223 | ||
181 | 1224 | // update the state of the window in the _decor_map | 1224 | // update the state of the window in the _decor_map |
183 | 1225 | _decor_map[xid] = WindowManager::Default()->IsWindowDecorated(xid); | 1225 | _decor_map[xid] = WindowManager::Default()->HasWindowDecorations(xid); |
184 | 1226 | 1226 | ||
185 | 1227 | if (_decor_map[xid]) | 1227 | if (_decor_map[xid]) |
186 | 1228 | WindowManager::Default()->Undecorate(xid); | 1228 | WindowManager::Default()->Undecorate(xid); |
187 | @@ -1716,7 +1716,7 @@ | |||
188 | 1716 | { | 1716 | { |
189 | 1717 | Window xid = bamf_window_get_xid(window); | 1717 | Window xid = bamf_window_get_xid(window); |
190 | 1718 | 1718 | ||
192 | 1719 | _decor_map[xid] = WindowManager::Default()->IsWindowDecorated(xid); | 1719 | _decor_map[xid] = WindowManager::Default()->HasWindowDecorations(xid); |
193 | 1720 | 1720 | ||
194 | 1721 | if (_decor_map[xid]) | 1721 | if (_decor_map[xid]) |
195 | 1722 | WindowManager::Default()->Undecorate(xid); | 1722 | WindowManager::Default()->Undecorate(xid); |
196 | 1723 | 1723 | ||
197 | === modified file 'plugins/unityshell/src/PluginAdapter.cpp' | |||
198 | --- plugins/unityshell/src/PluginAdapter.cpp 2012-07-18 15:25:17 +0000 | |||
199 | +++ plugins/unityshell/src/PluginAdapter.cpp 2013-05-07 13:13:46 +0000 | |||
200 | @@ -1,6 +1,6 @@ | |||
201 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- |
202 | 2 | /* | 2 | /* |
204 | 3 | * Copyright (C) 2010 Canonical Ltd | 3 | * Copyright (C) 2010-2012 Canonical Ltd |
205 | 4 | * | 4 | * |
206 | 5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
207 | 6 | * it under the terms of the GNU General Public License version 3 as | 6 | * it under the terms of the GNU General Public License version 3 as |
208 | @@ -42,7 +42,6 @@ | |||
209 | 42 | #define MWM_HINTS_FUNCTIONS (1L << 0) | 42 | #define MWM_HINTS_FUNCTIONS (1L << 0) |
210 | 43 | #define MWM_HINTS_DECORATIONS (1L << 1) | 43 | #define MWM_HINTS_DECORATIONS (1L << 1) |
211 | 44 | #define MWM_HINTS_UNDECORATED_UNITY 0x80 | 44 | #define MWM_HINTS_UNDECORATED_UNITY 0x80 |
212 | 45 | #define _XA_MOTIF_WM_HINTS "_MOTIF_WM_HINTS" | ||
213 | 46 | 45 | ||
214 | 47 | /* static */ | 46 | /* static */ |
215 | 48 | PluginAdapter* | 47 | PluginAdapter* |
216 | @@ -151,13 +150,17 @@ | |||
217 | 151 | void | 150 | void |
218 | 152 | PluginAdapter::NotifyNewDecorationState(guint32 xid) | 151 | PluginAdapter::NotifyNewDecorationState(guint32 xid) |
219 | 153 | { | 152 | { |
221 | 154 | bool wasTracked = (_window_decoration_state.find (xid) != _window_decoration_state.end ()); | 153 | auto deco_state_it = _window_decoration_state.find(xid); |
222 | 154 | bool wasTracked = (deco_state_it != _window_decoration_state.end()); | ||
223 | 155 | bool wasDecorated = false; | 155 | bool wasDecorated = false; |
224 | 156 | 156 | ||
225 | 157 | if (wasTracked) | 157 | if (wasTracked) |
226 | 158 | { | ||
227 | 158 | wasDecorated = _window_decoration_state[xid]; | 159 | wasDecorated = _window_decoration_state[xid]; |
228 | 160 | _window_decoration_state.erase(deco_state_it); | ||
229 | 161 | } | ||
230 | 159 | 162 | ||
232 | 160 | bool decorated = IsWindowDecorated (xid); | 163 | bool decorated = HasWindowDecorations(xid); |
233 | 161 | 164 | ||
234 | 162 | if (decorated == wasDecorated) | 165 | if (decorated == wasDecorated) |
235 | 163 | return; | 166 | return; |
236 | @@ -415,44 +418,74 @@ | |||
237 | 415 | return false; | 418 | return false; |
238 | 416 | } | 419 | } |
239 | 417 | 420 | ||
242 | 418 | bool | 421 | unsigned long |
243 | 419 | PluginAdapter::IsWindowDecorated(guint32 xid) | 422 | PluginAdapter::GetMwnDecorations(Window window_id) const |
244 | 420 | { | 423 | { |
245 | 421 | Display* display = m_Screen->dpy(); | 424 | Display* display = m_Screen->dpy(); |
246 | 422 | Window win = xid; | ||
247 | 423 | Atom hints_atom = None; | ||
248 | 424 | MotifWmHints* hints = NULL; | 425 | MotifWmHints* hints = NULL; |
249 | 425 | Atom type = None; | 426 | Atom type = None; |
250 | 426 | gint format; | 427 | gint format; |
251 | 427 | gulong nitems; | 428 | gulong nitems; |
252 | 428 | gulong bytes_after; | 429 | gulong bytes_after; |
258 | 429 | bool ret = true; | 430 | unsigned long decorations = 0; |
259 | 430 | 431 | ||
260 | 431 | hints_atom = XInternAtom(display, _XA_MOTIF_WM_HINTS, false); | 432 | if (XGetWindowProperty(display, window_id, Atoms::mwmHints, 0, |
256 | 432 | |||
257 | 433 | if (XGetWindowProperty(display, win, hints_atom, 0, | ||
261 | 434 | sizeof(MotifWmHints) / sizeof(long), False, | 433 | sizeof(MotifWmHints) / sizeof(long), False, |
263 | 435 | hints_atom, &type, &format, &nitems, &bytes_after, | 434 | Atoms::mwmHints, &type, &format, &nitems, &bytes_after, |
264 | 436 | (guchar**)&hints) != Success) | 435 | (guchar**)&hints) != Success) |
266 | 437 | return false; | 436 | { |
267 | 437 | return decorations; | ||
268 | 438 | } | ||
269 | 439 | |||
270 | 440 | decorations |= (MwmDecorAll | MwmDecorTitle); | ||
271 | 438 | 441 | ||
272 | 439 | if (!hints) | 442 | if (!hints) |
274 | 440 | return ret; | 443 | return decorations; |
275 | 441 | 444 | ||
276 | 442 | /* Check for the presence of the high bit | 445 | /* Check for the presence of the high bit |
277 | 443 | * if present, it means that we undecorated | 446 | * if present, it means that we undecorated |
278 | 444 | * this window, so don't mark it as undecorated */ | 447 | * this window, so don't mark it as undecorated */ |
281 | 445 | if (type == hints_atom && format != 0 && | 448 | if (type == Atoms::mwmHints && format != 0 && hints->flags & MWM_HINTS_DECORATIONS) |
280 | 446 | hints->flags & MWM_HINTS_DECORATIONS) | ||
282 | 447 | { | 449 | { |
287 | 448 | /* Must have both bits set */ | 450 | decorations = hints->decorations; |
284 | 449 | _window_decoration_state[xid] = ret = | ||
285 | 450 | (hints->decorations & (MwmDecorAll | MwmDecorTitle)) || | ||
286 | 451 | (hints->decorations & MWM_HINTS_UNDECORATED_UNITY); | ||
288 | 452 | } | 451 | } |
289 | 453 | 452 | ||
290 | 454 | XFree(hints); | 453 | XFree(hints); |
292 | 455 | return ret; | 454 | return decorations; |
293 | 455 | } | ||
294 | 456 | |||
295 | 457 | bool | ||
296 | 458 | PluginAdapter::HasWindowDecorations(guint32 xid) const | ||
297 | 459 | { | ||
298 | 460 | Window window_id = xid; | ||
299 | 461 | auto deco_state_it = _window_decoration_state.find(window_id); | ||
300 | 462 | |||
301 | 463 | if (deco_state_it != _window_decoration_state.end()) | ||
302 | 464 | return deco_state_it->second; | ||
303 | 465 | |||
304 | 466 | unsigned long decorations = GetMwnDecorations(window_id); | ||
305 | 467 | |||
306 | 468 | /* Must have both bits set */ | ||
307 | 469 | bool decorated = (decorations & (MwmDecorAll | MwmDecorTitle)) || | ||
308 | 470 | (decorations & MWM_HINTS_UNDECORATED_UNITY); | ||
309 | 471 | |||
310 | 472 | _window_decoration_state[window_id] = decorated; | ||
311 | 473 | return decorated; | ||
312 | 474 | } | ||
313 | 475 | |||
314 | 476 | bool | ||
315 | 477 | PluginAdapter::IsWindowDecorated(guint32 xid) | ||
316 | 478 | { | ||
317 | 479 | Window window_id = xid; | ||
318 | 480 | |||
319 | 481 | bool decorated = GetMwnDecorations(window_id) & (MwmDecorAll | MwmDecorTitle); | ||
320 | 482 | |||
321 | 483 | if (decorated && GetCardinalProperty(window_id, Atoms::frameExtents).empty()) | ||
322 | 484 | { | ||
323 | 485 | decorated = false; | ||
324 | 486 | } | ||
325 | 487 | |||
326 | 488 | return decorated; | ||
327 | 456 | } | 489 | } |
328 | 457 | 490 | ||
329 | 458 | bool | 491 | bool |
330 | @@ -1023,7 +1056,6 @@ | |||
331 | 1023 | PluginAdapter::SetMwmWindowHints(Window xid, MotifWmHints* new_hints) | 1056 | PluginAdapter::SetMwmWindowHints(Window xid, MotifWmHints* new_hints) |
332 | 1024 | { | 1057 | { |
333 | 1025 | Display* display = m_Screen->dpy(); | 1058 | Display* display = m_Screen->dpy(); |
334 | 1026 | Atom hints_atom = None; | ||
335 | 1027 | MotifWmHints* data = NULL; | 1059 | MotifWmHints* data = NULL; |
336 | 1028 | MotifWmHints* hints = NULL; | 1060 | MotifWmHints* hints = NULL; |
337 | 1029 | Atom type = None; | 1061 | Atom type = None; |
338 | @@ -1031,18 +1063,16 @@ | |||
339 | 1031 | gulong nitems; | 1063 | gulong nitems; |
340 | 1032 | gulong bytes_after; | 1064 | gulong bytes_after; |
341 | 1033 | 1065 | ||
342 | 1034 | hints_atom = XInternAtom(display, _XA_MOTIF_WM_HINTS, false); | ||
343 | 1035 | |||
344 | 1036 | if (XGetWindowProperty(display, | 1066 | if (XGetWindowProperty(display, |
345 | 1037 | xid, | 1067 | xid, |
347 | 1038 | hints_atom, 0, sizeof(MotifWmHints) / sizeof(long), | 1068 | Atoms::mwmHints, 0, sizeof(MotifWmHints) / sizeof(long), |
348 | 1039 | False, AnyPropertyType, &type, &format, &nitems, | 1069 | False, AnyPropertyType, &type, &format, &nitems, |
349 | 1040 | &bytes_after, (guchar**)&data) != Success) | 1070 | &bytes_after, (guchar**)&data) != Success) |
350 | 1041 | { | 1071 | { |
351 | 1042 | return; | 1072 | return; |
352 | 1043 | } | 1073 | } |
353 | 1044 | 1074 | ||
355 | 1045 | if (type != hints_atom || !data) | 1075 | if (type != Atoms::mwmHints || !data) |
356 | 1046 | { | 1076 | { |
357 | 1047 | hints = new_hints; | 1077 | hints = new_hints; |
358 | 1048 | } | 1078 | } |
359 | @@ -1064,7 +1094,7 @@ | |||
360 | 1064 | 1094 | ||
361 | 1065 | XChangeProperty(display, | 1095 | XChangeProperty(display, |
362 | 1066 | xid, | 1096 | xid, |
364 | 1067 | hints_atom, hints_atom, 32, PropModeReplace, | 1097 | Atoms::mwmHints, Atoms::mwmHints, 32, PropModeReplace, |
365 | 1068 | (guchar*)hints, sizeof(MotifWmHints) / sizeof(long)); | 1098 | (guchar*)hints, sizeof(MotifWmHints) / sizeof(long)); |
366 | 1069 | 1099 | ||
367 | 1070 | if (data) | 1100 | if (data) |
368 | @@ -1074,6 +1104,9 @@ | |||
369 | 1074 | void | 1104 | void |
370 | 1075 | PluginAdapter::Decorate(guint32 xid) | 1105 | PluginAdapter::Decorate(guint32 xid) |
371 | 1076 | { | 1106 | { |
372 | 1107 | if (!HasWindowDecorations(xid)) | ||
373 | 1108 | return; | ||
374 | 1109 | |||
375 | 1077 | MotifWmHints hints = { 0 }; | 1110 | MotifWmHints hints = { 0 }; |
376 | 1078 | 1111 | ||
377 | 1079 | hints.flags = MWM_HINTS_DECORATIONS; | 1112 | hints.flags = MWM_HINTS_DECORATIONS; |
378 | @@ -1085,6 +1118,9 @@ | |||
379 | 1085 | void | 1118 | void |
380 | 1086 | PluginAdapter::Undecorate(guint32 xid) | 1119 | PluginAdapter::Undecorate(guint32 xid) |
381 | 1087 | { | 1120 | { |
382 | 1121 | if (!IsWindowDecorated(xid)) | ||
383 | 1122 | return; | ||
384 | 1123 | |||
385 | 1088 | MotifWmHints hints = { 0 }; | 1124 | MotifWmHints hints = { 0 }; |
386 | 1089 | 1125 | ||
387 | 1090 | /* Set the high bit to indicate that we undecorated this | 1126 | /* Set the high bit to indicate that we undecorated this |
388 | @@ -1319,3 +1355,29 @@ | |||
389 | 1319 | .add("expo_active", IsExpoActive()) | 1355 | .add("expo_active", IsExpoActive()) |
390 | 1320 | .add("viewport_switch_running", IsViewPortSwitchStarted()); | 1356 | .add("viewport_switch_running", IsViewPortSwitchStarted()); |
391 | 1321 | } | 1357 | } |
392 | 1358 | |||
393 | 1359 | std::vector<long> PluginAdapter::GetCardinalProperty(Window window_id, Atom atom) const | ||
394 | 1360 | { | ||
395 | 1361 | Atom type; | ||
396 | 1362 | int result, format; | ||
397 | 1363 | unsigned long n_items, bytes_after; | ||
398 | 1364 | long *buf = nullptr; | ||
399 | 1365 | |||
400 | 1366 | result = XGetWindowProperty(m_Screen->dpy(), window_id, atom, 0L, 65536, False, | ||
401 | 1367 | XA_CARDINAL, &type, &format, &n_items, &bytes_after, | ||
402 | 1368 | reinterpret_cast<unsigned char **>(&buf)); | ||
403 | 1369 | |||
404 | 1370 | std::unique_ptr<long[], int(*)(void*)> buffer(buf, XFree); | ||
405 | 1371 | |||
406 | 1372 | if (result == Success && type == XA_CARDINAL && format == 32 && buffer && n_items > 0) | ||
407 | 1373 | { | ||
408 | 1374 | std::vector<long> values(n_items); | ||
409 | 1375 | |||
410 | 1376 | for (unsigned i = 0; i < n_items; ++i) | ||
411 | 1377 | values[i] = buffer[i]; | ||
412 | 1378 | |||
413 | 1379 | return values; | ||
414 | 1380 | } | ||
415 | 1381 | |||
416 | 1382 | return std::vector<long>(); | ||
417 | 1383 | } | ||
418 | 1322 | 1384 | ||
419 | === modified file 'plugins/unityshell/src/PluginAdapter.h' | |||
420 | --- plugins/unityshell/src/PluginAdapter.h 2012-04-27 11:42:56 +0000 | |||
421 | +++ plugins/unityshell/src/PluginAdapter.h 2013-05-07 13:13:46 +0000 | |||
422 | @@ -1,6 +1,6 @@ | |||
423 | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- | 1 | // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*- |
424 | 2 | /* | 2 | /* |
426 | 3 | * Copyright (C) 2010 Canonical Ltd | 3 | * Copyright (C) 2010-2012 Canonical Ltd |
427 | 4 | * | 4 | * |
428 | 5 | * This program is free software: you can redistribute it and/or modify | 5 | * This program is free software: you can redistribute it and/or modify |
429 | 6 | * it under the terms of the GNU General Public License version 3 as | 6 | * it under the terms of the GNU General Public License version 3 as |
430 | @@ -125,6 +125,7 @@ | |||
431 | 125 | bool IsWindowClosable(guint32 xid); | 125 | bool IsWindowClosable(guint32 xid); |
432 | 126 | bool IsWindowMinimizable(guint32 xid); | 126 | bool IsWindowMinimizable(guint32 xid); |
433 | 127 | bool IsWindowMaximizable(guint32 xid); | 127 | bool IsWindowMaximizable(guint32 xid); |
434 | 128 | bool HasWindowDecorations(guint32 xid) const; | ||
435 | 128 | 129 | ||
436 | 129 | void Restore(guint32 xid); | 130 | void Restore(guint32 xid); |
437 | 130 | void RestoreAt(guint32 xid, int x, int y); | 131 | void RestoreAt(guint32 xid, int x, int y); |
438 | @@ -174,6 +175,9 @@ | |||
439 | 174 | 175 | ||
440 | 175 | bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window); | 176 | bool CheckWindowIntersection(nux::Geometry const& region, CompWindow* window); |
441 | 176 | void SetMwmWindowHints(Window xid, MotifWmHints* new_hints); | 177 | void SetMwmWindowHints(Window xid, MotifWmHints* new_hints); |
442 | 178 | unsigned long GetMwnDecorations(Window xid) const; | ||
443 | 179 | |||
444 | 180 | std::vector<long> GetCardinalProperty(Window xid, Atom atom) const; | ||
445 | 177 | 181 | ||
446 | 178 | CompScreen* m_Screen; | 182 | CompScreen* m_Screen; |
447 | 179 | MultiActionList m_ExpoActionList; | 183 | MultiActionList m_ExpoActionList; |
448 | @@ -193,7 +197,7 @@ | |||
449 | 193 | bool _in_show_desktop; | 197 | bool _in_show_desktop; |
450 | 194 | CompWindow* _last_focused_window; | 198 | CompWindow* _last_focused_window; |
451 | 195 | 199 | ||
453 | 196 | std::map<guint32, unsigned int> _window_decoration_state; | 200 | mutable std::map<guint32, unsigned int> _window_decoration_state; |
454 | 197 | 201 | ||
455 | 198 | static PluginAdapter* _default; | 202 | static PluginAdapter* _default; |
456 | 199 | }; | 203 | }; |
457 | 200 | 204 | ||
458 | === modified file 'plugins/unityshell/src/ResultRendererTile.cpp' | |||
459 | --- plugins/unityshell/src/ResultRendererTile.cpp 2012-04-25 12:09:59 +0000 | |||
460 | +++ plugins/unityshell/src/ResultRendererTile.cpp 2013-05-07 13:13:46 +0000 | |||
461 | @@ -21,14 +21,10 @@ | |||
462 | 21 | */ | 21 | */ |
463 | 22 | 22 | ||
464 | 23 | 23 | ||
465 | 24 | #include <sstream> // for ostringstream | ||
466 | 25 | #include "ResultRendererTile.h" | 24 | #include "ResultRendererTile.h" |
467 | 26 | 25 | ||
468 | 27 | #include <boost/algorithm/string.hpp> | ||
469 | 28 | |||
470 | 29 | #include <pango/pango.h> | 26 | #include <pango/pango.h> |
471 | 30 | #include <pango/pangocairo.h> | 27 | #include <pango/pangocairo.h> |
472 | 31 | #include <gdk/gdk.h> | ||
473 | 32 | #include <gtk/gtk.h> | 28 | #include <gtk/gtk.h> |
474 | 33 | 29 | ||
475 | 34 | #include <NuxCore/Logger.h> | 30 | #include <NuxCore/Logger.h> |
476 | @@ -51,6 +47,7 @@ | |||
477 | 51 | namespace | 47 | namespace |
478 | 52 | { | 48 | { |
479 | 53 | nux::logging::Logger logger("unity.dash.results"); | 49 | nux::logging::Logger logger("unity.dash.results"); |
480 | 50 | const std::string DEFAULT_GICON = ". GThemedIcon text-x-preview"; | ||
481 | 54 | 51 | ||
482 | 55 | const int FONT_SIZE = 10; | 52 | const int FONT_SIZE = 10; |
483 | 56 | } | 53 | } |
484 | @@ -230,7 +227,7 @@ | |||
485 | 230 | 227 | ||
486 | 231 | void ResultRendererTile::Preload(Result& row) | 228 | void ResultRendererTile::Preload(Result& row) |
487 | 232 | { | 229 | { |
489 | 233 | if (row.renderer<TextureContainer*>() == nullptr) | 230 | if (!row.renderer<TextureContainer*>()) |
490 | 234 | { | 231 | { |
491 | 235 | row.set_renderer(new TextureContainer()); | 232 | row.set_renderer(new TextureContainer()); |
492 | 236 | LoadIcon(row); | 233 | LoadIcon(row); |
493 | @@ -240,17 +237,25 @@ | |||
494 | 240 | 237 | ||
495 | 241 | void ResultRendererTile::Unload(Result& row) | 238 | void ResultRendererTile::Unload(Result& row) |
496 | 242 | { | 239 | { |
499 | 243 | TextureContainer *container = row.renderer<TextureContainer*>(); | 240 | delete row.renderer<TextureContainer*>(); |
498 | 244 | delete container; | ||
500 | 245 | row.set_renderer<TextureContainer*>(nullptr); | 241 | row.set_renderer<TextureContainer*>(nullptr); |
501 | 246 | } | 242 | } |
502 | 247 | 243 | ||
503 | 248 | void ResultRendererTile::LoadIcon(Result& row) | 244 | void ResultRendererTile::LoadIcon(Result& row) |
504 | 249 | { | 245 | { |
505 | 246 | auto container = row.renderer<TextureContainer*>(); | ||
506 | 247 | |||
507 | 248 | if (!container) | ||
508 | 249 | { | ||
509 | 250 | LOG_ERROR(logger) << "No valid container for Result " << row.name() << " with URI " | ||
510 | 251 | << row.uri(); | ||
511 | 252 | return; | ||
512 | 253 | } | ||
513 | 254 | |||
514 | 250 | Style& style = Style::Instance(); | 255 | Style& style = Style::Instance(); |
515 | 251 | std::string const& icon_hint = row.icon_hint; | 256 | std::string const& icon_hint = row.icon_hint; |
516 | 252 | #define DEFAULT_GICON ". GThemedIcon text-x-preview" | ||
517 | 253 | std::string icon_name; | 257 | std::string icon_name; |
518 | 258 | |||
519 | 254 | if (G_UNLIKELY(neko)) | 259 | if (G_UNLIKELY(neko)) |
520 | 255 | { | 260 | { |
521 | 256 | int tmp1 = style.GetTileIconSize() + (rand() % 16) - 8; | 261 | int tmp1 = style.GetTileIconSize() + (rand() % 16) - 8; |
522 | @@ -266,28 +271,25 @@ | |||
523 | 266 | icon_name = !icon_hint.empty() ? icon_hint : DEFAULT_GICON; | 271 | icon_name = !icon_hint.empty() ? icon_hint : DEFAULT_GICON; |
524 | 267 | } | 272 | } |
525 | 268 | 273 | ||
534 | 269 | 274 | auto slot = sigc::bind(sigc::mem_fun(this, &ResultRendererTile::IconLoaded), icon_hint, row); | |
535 | 270 | 275 | ||
536 | 271 | GIcon* icon = g_icon_new_for_string(icon_name.c_str(), NULL); | 276 | if (icon_name.find("://") != std::string::npos) |
529 | 272 | TextureContainer* container = row.renderer<TextureContainer*>(); | ||
530 | 273 | |||
531 | 274 | IconLoader::IconLoaderCallback slot = sigc::bind(sigc::mem_fun(this, &ResultRendererTile::IconLoaded), icon_hint, row); | ||
532 | 275 | |||
533 | 276 | if (g_strrstr(icon_name.c_str(), "://")) | ||
537 | 277 | { | 277 | { |
538 | 278 | container->slot_handle = IconLoader::GetDefault().LoadFromURI(icon_name, style.GetTileIconSize(), slot); | 278 | container->slot_handle = IconLoader::GetDefault().LoadFromURI(icon_name, style.GetTileIconSize(), slot); |
539 | 279 | } | 279 | } |
540 | 280 | else if (G_IS_ICON(icon)) | ||
541 | 281 | { | ||
542 | 282 | container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, style.GetTileIconSize(), slot); | ||
543 | 283 | } | ||
544 | 284 | else | 280 | else |
545 | 285 | { | 281 | { |
547 | 286 | container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, style.GetTileIconSize(), slot); | 282 | glib::Object<GIcon> icon(g_icon_new_for_string(icon_name.c_str(), nullptr)); |
548 | 283 | |||
549 | 284 | if (G_IS_ICON(icon.RawPtr())) | ||
550 | 285 | { | ||
551 | 286 | container->slot_handle = IconLoader::GetDefault().LoadFromGIconString(icon_name, style.GetTileIconSize(), slot); | ||
552 | 287 | } | ||
553 | 288 | else | ||
554 | 289 | { | ||
555 | 290 | container->slot_handle = IconLoader::GetDefault().LoadFromIconName(icon_name, style.GetTileIconSize(), slot); | ||
556 | 291 | } | ||
557 | 287 | } | 292 | } |
558 | 288 | |||
559 | 289 | if (icon != NULL) | ||
560 | 290 | g_object_unref(icon); | ||
561 | 291 | } | 293 | } |
562 | 292 | 294 | ||
563 | 293 | nux::BaseTexture* ResultRendererTile::CreateTextureCallback(std::string const& texid, | 295 | nux::BaseTexture* ResultRendererTile::CreateTextureCallback(std::string const& texid, |
564 | 294 | 296 | ||
565 | === modified file 'plugins/unityshell/src/WindowManager.cpp' | |||
566 | --- plugins/unityshell/src/WindowManager.cpp 2012-07-18 15:25:17 +0000 | |||
567 | +++ plugins/unityshell/src/WindowManager.cpp 2013-05-07 13:13:46 +0000 | |||
568 | @@ -58,6 +58,11 @@ | |||
569 | 58 | return true; | 58 | return true; |
570 | 59 | } | 59 | } |
571 | 60 | 60 | ||
572 | 61 | bool HasWindowDecorations(guint32 xid) const | ||
573 | 62 | { | ||
574 | 63 | return true; | ||
575 | 64 | } | ||
576 | 65 | |||
577 | 61 | bool IsWindowOnCurrentDesktop(guint32 xid) | 66 | bool IsWindowOnCurrentDesktop(guint32 xid) |
578 | 62 | { | 67 | { |
579 | 63 | return true; | 68 | return true; |
580 | 64 | 69 | ||
581 | === modified file 'plugins/unityshell/src/WindowManager.h' | |||
582 | --- plugins/unityshell/src/WindowManager.h 2012-07-18 15:25:17 +0000 | |||
583 | +++ plugins/unityshell/src/WindowManager.h 2013-05-07 13:13:46 +0000 | |||
584 | @@ -61,6 +61,7 @@ | |||
585 | 61 | virtual bool IsWindowClosable(guint32 xid) = 0; | 61 | virtual bool IsWindowClosable(guint32 xid) = 0; |
586 | 62 | virtual bool IsWindowMinimizable(guint32 xid) = 0; | 62 | virtual bool IsWindowMinimizable(guint32 xid) = 0; |
587 | 63 | virtual bool IsWindowMaximizable(guint32 xid) = 0; | 63 | virtual bool IsWindowMaximizable(guint32 xid) = 0; |
588 | 64 | virtual bool HasWindowDecorations(guint32 xid) const = 0; | ||
589 | 64 | 65 | ||
590 | 65 | virtual void ShowDesktop() = 0; | 66 | virtual void ShowDesktop() = 0; |
591 | 66 | 67 | ||
592 | 67 | 68 | ||
593 | === modified file 'plugins/unityshell/src/unityshell.cpp' | |||
594 | --- plugins/unityshell/src/unityshell.cpp 2012-11-12 12:20:38 +0000 | |||
595 | +++ plugins/unityshell/src/unityshell.cpp 2013-05-07 13:13:46 +0000 | |||
596 | @@ -592,18 +592,8 @@ | |||
597 | 592 | 592 | ||
598 | 593 | // compiz doesn't use the same method of tracking monitors as our toolkit | 593 | // compiz doesn't use the same method of tracking monitors as our toolkit |
599 | 594 | // we need to make sure we properly associate with the right monitor | 594 | // we need to make sure we properly associate with the right monitor |
612 | 595 | int current_monitor = -1; | 595 | auto const& uscreen = UScreen::GetDefault(); |
613 | 596 | auto monitors = UScreen::GetDefault()->GetMonitors(); | 596 | int current_monitor = uscreen->GetMonitorAtPosition(output->x(), output->y()); |
602 | 597 | int i = 0; | ||
603 | 598 | for (auto monitor : monitors) | ||
604 | 599 | { | ||
605 | 600 | if (monitor.x == output->x() && monitor.y == output->y()) | ||
606 | 601 | { | ||
607 | 602 | current_monitor = i; | ||
608 | 603 | break; | ||
609 | 604 | } | ||
610 | 605 | i++; | ||
611 | 606 | } | ||
614 | 607 | 597 | ||
615 | 608 | if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) | 598 | if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) |
616 | 609 | && panel_controller_->opacity() > 0.0f) | 599 | && panel_controller_->opacity() > 0.0f) |
617 | @@ -671,18 +661,8 @@ | |||
618 | 671 | 661 | ||
619 | 672 | // compiz doesn't use the same method of tracking monitors as our toolkit | 662 | // compiz doesn't use the same method of tracking monitors as our toolkit |
620 | 673 | // we need to make sure we properly associate with the right monitor | 663 | // we need to make sure we properly associate with the right monitor |
633 | 674 | int current_monitor = -1; | 664 | auto const& uscreen = UScreen::GetDefault(); |
634 | 675 | auto monitors = UScreen::GetDefault()->GetMonitors(); | 665 | int current_monitor = uscreen->GetMonitorAtPosition(output->x(), output->y()); |
623 | 676 | int i = 0; | ||
624 | 677 | for (auto monitor : monitors) | ||
625 | 678 | { | ||
626 | 679 | if (monitor.x == output->x() && monitor.y == output->y()) | ||
627 | 680 | { | ||
628 | 681 | current_monitor = i; | ||
629 | 682 | break; | ||
630 | 683 | } | ||
631 | 684 | i++; | ||
632 | 685 | } | ||
635 | 686 | 666 | ||
636 | 687 | if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) | 667 | if (!(launcher_controller_->IsOverlayOpen() && current_monitor == dash_monitor_) |
637 | 688 | && panel_controller_->opacity() > 0.0f) | 668 | && panel_controller_->opacity() > 0.0f) |
638 | @@ -2345,7 +2325,7 @@ | |||
639 | 2345 | return "Unity"; | 2325 | return "Unity"; |
640 | 2346 | } | 2326 | } |
641 | 2347 | 2327 | ||
643 | 2348 | bool isNuxWindow (CompWindow* value) | 2328 | bool isNuxWindow(CompWindow* value) |
644 | 2349 | { | 2329 | { |
645 | 2350 | std::vector<Window> const& xwns = nux::XInputWindow::NativeHandleList(); | 2330 | std::vector<Window> const& xwns = nux::XInputWindow::NativeHandleList(); |
646 | 2351 | auto id = value->id(); | 2331 | auto id = value->id(); |
647 | @@ -2394,13 +2374,21 @@ | |||
648 | 2394 | * fully covers the shell on its output. It does not include regular windows | 2374 | * fully covers the shell on its output. It does not include regular windows |
649 | 2395 | * stacked above the shell like DnD icons or Onboard etc. | 2375 | * stacked above the shell like DnD icons or Onboard etc. |
650 | 2396 | */ | 2376 | */ |
652 | 2397 | if (isNuxWindow(window)) | 2377 | if (G_UNLIKELY(is_nux_window_)) |
653 | 2398 | { | 2378 | { |
654 | 2399 | if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) | 2379 | if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) |
655 | 2400 | { | 2380 | { |
656 | 2401 | uScreen->nuxRegion += window->geometry(); | 2381 | uScreen->nuxRegion += window->geometry(); |
657 | 2402 | uScreen->nuxRegion -= uScreen->fullscreenRegion; | 2382 | uScreen->nuxRegion -= uScreen->fullscreenRegion; |
658 | 2403 | } | 2383 | } |
659 | 2384 | |||
660 | 2385 | if (window->id() == screen->activeWindow() && | ||
661 | 2386 | !(mask & PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK)) | ||
662 | 2387 | { | ||
663 | 2388 | if (!mask) | ||
664 | 2389 | uScreen->paintPanelShadow(matrix); | ||
665 | 2390 | } | ||
666 | 2391 | |||
667 | 2404 | return false; // Ensure nux windows are never painted by compiz | 2392 | return false; // Ensure nux windows are never painted by compiz |
668 | 2405 | } | 2393 | } |
669 | 2406 | else if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) | 2394 | else if (mask & PAINT_WINDOW_OCCLUSION_DETECTION_MASK) |
670 | @@ -2483,8 +2471,7 @@ | |||
671 | 2483 | if (uScreen->doShellRepaint && | 2471 | if (uScreen->doShellRepaint && |
672 | 2484 | !uScreen->forcePaintOnTop () && | 2472 | !uScreen->forcePaintOnTop () && |
673 | 2485 | window == uScreen->firstWindowAboveShell && | 2473 | window == uScreen->firstWindowAboveShell && |
676 | 2486 | !uScreen->fullscreenRegion.contains(window->geometry()) | 2474 | !uScreen->fullscreenRegion.contains(window->geometry())) |
675 | 2487 | ) | ||
677 | 2488 | { | 2475 | { |
678 | 2489 | #ifdef USE_GLES | 2476 | #ifdef USE_GLES |
679 | 2490 | uScreen->paintDisplay(); | 2477 | uScreen->paintDisplay(); |
680 | @@ -3154,6 +3141,7 @@ | |||
681 | 3154 | , mMinimizeHandler() | 3141 | , mMinimizeHandler() |
682 | 3155 | , mShowdesktopHandler(nullptr) | 3142 | , mShowdesktopHandler(nullptr) |
683 | 3156 | , focusdesktop_handle_(0) | 3143 | , focusdesktop_handle_(0) |
684 | 3144 | , is_nux_window_(isNuxWindow(window)) | ||
685 | 3157 | { | 3145 | { |
686 | 3158 | WindowInterface::setHandler(window); | 3146 | WindowInterface::setHandler(window); |
687 | 3159 | GLWindowInterface::setHandler(gWindow); | 3147 | GLWindowInterface::setHandler(gWindow); |
688 | 3160 | 3148 | ||
689 | === modified file 'plugins/unityshell/src/unityshell.h' | |||
690 | --- plugins/unityshell/src/unityshell.h 2012-09-11 10:38:44 +0000 | |||
691 | +++ plugins/unityshell/src/unityshell.h 2013-05-07 13:13:46 +0000 | |||
692 | @@ -434,8 +434,8 @@ | |||
693 | 434 | unsigned int GetNoCoreInstanceMask (); | 434 | unsigned int GetNoCoreInstanceMask (); |
694 | 435 | 435 | ||
695 | 436 | compiz::WindowInputRemoverLock::Ptr GetInputRemover (); | 436 | compiz::WindowInputRemoverLock::Ptr GetInputRemover (); |
696 | 437 | |||
697 | 438 | compiz::WindowInputRemoverLock::Weak input_remover_; | 437 | compiz::WindowInputRemoverLock::Weak input_remover_; |
698 | 438 | bool is_nux_window_; | ||
699 | 439 | }; | 439 | }; |
700 | 440 | 440 | ||
701 | 441 | 441 | ||
702 | 442 | 442 | ||
703 | === modified file 'tests/test_launcher_controller.cpp' | |||
704 | --- tests/test_launcher_controller.cpp 2012-07-26 13:12:26 +0000 | |||
705 | +++ tests/test_launcher_controller.cpp 2013-05-07 13:13:46 +0000 | |||
706 | @@ -111,6 +111,16 @@ | |||
707 | 111 | } | 111 | } |
708 | 112 | } | 112 | } |
709 | 113 | 113 | ||
710 | 114 | TEST_F(TestLauncherController, MirroredMultimonitorSingleLauncherOnExternalMonitor) | ||
711 | 115 | { | ||
712 | 116 | // See lp bug 991637 | ||
713 | 117 | lc.multiple_launchers = false; | ||
714 | 118 | uscreen.SetPrimary(1); | ||
715 | 119 | |||
716 | 120 | ASSERT_EQ(lc.launchers().size(), 1); | ||
717 | 121 | ASSERT_EQ(lc.launcher().monitor(), 0); | ||
718 | 122 | } | ||
719 | 123 | |||
720 | 114 | TEST_F(TestLauncherController, MultimonitorSwitchToMultipleLaunchers) | 124 | TEST_F(TestLauncherController, MultimonitorSwitchToMultipleLaunchers) |
721 | 115 | { | 125 | { |
722 | 116 | lc.multiple_launchers = false; | 126 | lc.multiple_launchers = false; |
723 | 117 | 127 | ||
724 | === modified file 'tests/test_service_lens.c' | |||
725 | --- tests/test_service_lens.c 2011-12-08 08:48:10 +0000 | |||
726 | +++ tests/test_service_lens.c 2013-05-07 13:13:46 +0000 | |||
727 | @@ -8,7 +8,6 @@ | |||
728 | 8 | static void add_filters(ServiceLens *self); | 8 | static void add_filters(ServiceLens *self); |
729 | 9 | static void on_search_changed(UnityScope* scope, UnityLensSearch *lens_search, UnitySearchType search_type, GCancellable *canc, ServiceLens* self); | 9 | static void on_search_changed(UnityScope* scope, UnityLensSearch *lens_search, UnitySearchType search_type, GCancellable *canc, ServiceLens* self); |
730 | 10 | static UnityActivationResponse* on_activate_uri(UnityScope* scope, const char* uri, ServiceLens* self); | 10 | static UnityActivationResponse* on_activate_uri(UnityScope* scope, const char* uri, ServiceLens* self); |
731 | 11 | static UnityPreview* on_preview_uri(UnityScope* scope, const char* uri, ServiceLens *self); | ||
732 | 12 | 11 | ||
733 | 13 | struct _ServiceLensPrivate | 12 | struct _ServiceLensPrivate |
734 | 14 | { | 13 | { |
735 | @@ -59,8 +58,6 @@ | |||
736 | 59 | G_CALLBACK(on_search_changed), self); | 58 | G_CALLBACK(on_search_changed), self); |
737 | 60 | g_signal_connect(priv->scope, "activate-uri", | 59 | g_signal_connect(priv->scope, "activate-uri", |
738 | 61 | G_CALLBACK(on_activate_uri), self); | 60 | G_CALLBACK(on_activate_uri), self); |
739 | 62 | g_signal_connect(priv->scope, "preview-uri", | ||
740 | 63 | G_CALLBACK(on_preview_uri), self); | ||
741 | 64 | 61 | ||
742 | 65 | /* Get ready to export and export */ | 62 | /* Get ready to export and export */ |
743 | 66 | unity_lens_add_local_scope(priv->lens, priv->scope); | 63 | unity_lens_add_local_scope(priv->lens, priv->scope); |
744 | @@ -183,18 +180,6 @@ | |||
745 | 183 | return unity_activation_response_new(UNITY_HANDLED_TYPE_HIDE_DASH, ""); | 180 | return unity_activation_response_new(UNITY_HANDLED_TYPE_HIDE_DASH, ""); |
746 | 184 | } | 181 | } |
747 | 185 | 182 | ||
748 | 186 | static UnityPreview* | ||
749 | 187 | on_preview_uri(UnityScope* scope, const char* uri, ServiceLens *self) | ||
750 | 188 | { | ||
751 | 189 | gchar *genres[] = {"awesome"}; | ||
752 | 190 | return (UnityPreview*)unity_track_preview_new(1, "Animus Vox", | ||
753 | 191 | "The Glitch Mob", "Drink The Sea", | ||
754 | 192 | 404, genres, 1, | ||
755 | 193 | "file://music/the/track", "Play", | ||
756 | 194 | "", "play://music/the/track", | ||
757 | 195 | "preview://music/the/track", "pause://music/the/track"); | ||
758 | 196 | } | ||
759 | 197 | |||
760 | 198 | ServiceLens* | 183 | ServiceLens* |
761 | 199 | service_lens_new() | 184 | service_lens_new() |
762 | 200 | { | 185 | { |
And looking good! sponsored :)