Merge lp:~3v1n0/unity/launcher-primary-indicators-fix into lp:unity
- launcher-primary-indicators-fix
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Marco Trevisan (Treviño) |
Approved revision: | no longer in the source branch. |
Merged at revision: | 2165 |
Proposed branch: | lp:~3v1n0/unity/launcher-primary-indicators-fix |
Merge into: | lp:unity |
Diff against target: |
397 lines (+251/-50) 7 files modified
manual-tests/Launcher.txt (+154/-0) plugins/unityshell/src/AbstractLauncherIcon.h (+3/-1) plugins/unityshell/src/BamfLauncherIcon.cpp (+59/-43) plugins/unityshell/src/BamfLauncherIcon.h (+11/-0) plugins/unityshell/src/Launcher.cpp (+1/-1) plugins/unityshell/src/LauncherIcon.h (+7/-5) plugins/unityshell/src/MockLauncherIcon.h (+16/-0) |
To merge this branch: | bzr merge lp:~3v1n0/unity/launcher-primary-indicators-fix |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Thomi Richards (community) | Approve | ||
Jason Smith (community) | Approve | ||
Review via email: mp+98860@code.launchpad.net |
Commit message
BamfLauncherIcon: implement WindowsOnViewport to get only windows on visible VP
This function doesn't take account of the monitors.
Rewritten also BamfLauncherIco
to remove code duplication, using the new GetWindows function to perform
filtering via the WindowFilterMask.
Description of the change
UNBLOCK as requested by didrocks
Thomi Richards (thomir-deactivatedaccount) wrote : | # |
Hi,
Please make the manual test follow the test template (manual-
Tests need to be divided with a HR.
Tests need to have three stages: Setup, Actions, Expected Results.
For all three sections, steps should be bullet points, and as simple and explicit as possible.
For example, the first test should be written as:
<snip>
Test Launcher Icon with Windows in multiple monitors
-------
This test shows how the launcher should draw its iucons when there are
application windows in multiple monitors.
Setup:
* Run CCSM and ensure that the unity option in "Experimental" -> "Launcher Monitors" is set to "All Desktops"
Actions:
* Open two GEdit windows on monitor 1, workspace 1.
* Open one GEdit window on monitor 2, workspace 1.
* Focus one of the two gedit windows on monitor one.
Expected Results:
* GEdit launcher icon on monitor 1 must have:
* Two pips on the left of the icon.
* A filled-in arrow on the right of the icon.
* GEDit launcher icon on monitor 2 must have:
* One pip on the left of the icon
* One hollow arrow on the right of the icon.
</snip>
...Although you will need to make that correct (I can't understand your test as it is, so I made most of that up).
Create a separate test that describes what should happen when you move workspaces.
Remember: tests should be small and simple.
Tim Penhey (thumper) wrote : | # |
I'd like to see the manual tests become autopilot tests.
Thomi Richards (thomir-deactivatedaccount) wrote : | # |
I'd also like to see these made into autopilot tests. The last thing I want to see is a bunch more manual tests that we need to slog through every release.
Ideally I'd like to see the tests not repeat the actions / expected results sections, but this is good enough to be run.
I'll approve this now, on the understanding that someone (ideally not me) turns these into autopilot tests. The only reason we're adding manual tests now is that we're so close to a release.
Unity Merger (unity-merger) wrote : | # |
Attempt to merge into lp:unity failed due to conflicts:
text conflict in manual-
Marco Trevisan (Treviño) (3v1n0) wrote : | # |
> Ideally I'd like to see the tests not repeat the actions / expected results
> sections, but this is good enough to be run.
Yes, but we should also avoid to re-write the same actions for performing different tests.
IMHO we should just support something like "stages"... I.e.
TEST foo
Stage 1
Actions...
Expected results...
Stage 2
Actions...
Expected results...
.
So it will be easier to reference a single failure, but it would still avoid to re-define new tests only because there are actions dependents on the previous ones.
Preview Diff
1 | === modified file 'manual-tests/Launcher.txt' | |||
2 | --- manual-tests/Launcher.txt 2012-03-23 02:34:18 +0000 | |||
3 | +++ manual-tests/Launcher.txt 2012-03-23 10:29:18 +0000 | |||
4 | @@ -190,6 +190,160 @@ | |||
5 | 190 | from gnome-control-center -> Monitor should update the launcher position. | 190 | from gnome-control-center -> Monitor should update the launcher position. |
6 | 191 | 191 | ||
7 | 192 | 192 | ||
8 | 193 | Test Multiple Launchers with Windows in Multiple Monitors | ||
9 | 194 | --------------------------------------------------------- | ||
10 | 195 | This test shows how the launchers should draw their icons when there are | ||
11 | 196 | application windows in multiple monitors. | ||
12 | 197 | |||
13 | 198 | Setup: | ||
14 | 199 | * Run CCSM and ensure that the unity option in "Experimental" -> | ||
15 | 200 | "Launcher Monitors" is set to "All Desktops" | ||
16 | 201 | |||
17 | 202 | Actions: | ||
18 | 203 | * Open 2 Gedit windows on monitor 1, workspace 1. | ||
19 | 204 | * Open 1 Gedit window on monitor 2, workspace 1. | ||
20 | 205 | * Focus one of the two gedit windows on monitor 1. | ||
21 | 206 | |||
22 | 207 | Expected Results: | ||
23 | 208 | * Gedit launcher icon on monitor 1 must have: | ||
24 | 209 | * Two pips on the left of the icon. | ||
25 | 210 | * A filled-in arrow on the right of the icon. | ||
26 | 211 | * Gedit launcher icon on monitor 2 must have: | ||
27 | 212 | * One empty arrow on the left of the icon. | ||
28 | 213 | * Nothing on the right of the icon. | ||
29 | 214 | |||
30 | 215 | |||
31 | 216 | Test Multiple Launchers with Windows in Multiple Monitors and Workspaces | ||
32 | 217 | ------------------------------------------------------------------------ | ||
33 | 218 | This test shows how the launchers should draw their icons when there are | ||
34 | 219 | application windows in multiple monitors spreaded in multiple workspaces. | ||
35 | 220 | |||
36 | 221 | Setup: | ||
37 | 222 | * Run CCSM and ensure that the unity option in "Experimental" -> | ||
38 | 223 | "Launcher Monitors" is set to "All Desktops" | ||
39 | 224 | |||
40 | 225 | Actions: | ||
41 | 226 | * Open 1 Gedit window on monitor 1, workspace 1. | ||
42 | 227 | * Open 2 Gedit windows on monitor 2, workspace 1. | ||
43 | 228 | * Open 2 Gedit windows on monitor 1, workspace 2. | ||
44 | 229 | * Open 1 Gedit window on monitor 2, workspace 3. | ||
45 | 230 | * Move to workspace 1. | ||
46 | 231 | * Focus the gedit window on monitor 1. | ||
47 | 232 | |||
48 | 233 | Expected Results: | ||
49 | 234 | * Gedit launcher icon on monitor 1 must have: | ||
50 | 235 | * A filled-in arrow on the left of the icon. | ||
51 | 236 | * A filled-in arrow on the right of the icon. | ||
52 | 237 | * Gedit launcher icon on monitor 2 must have: | ||
53 | 238 | * Two pips on the left of the icon. | ||
54 | 239 | * Nothing on the right of the icon. | ||
55 | 240 | |||
56 | 241 | Actions: | ||
57 | 242 | * Move to workspace 2. | ||
58 | 243 | * Focus one of the two gedit windows on monitor 1. | ||
59 | 244 | |||
60 | 245 | Expected Results: | ||
61 | 246 | * Gedit launcher icon on monitor 1 must have: | ||
62 | 247 | * Two pips on the left of the icon. | ||
63 | 248 | * A filled-in arrow on the right of the icon. | ||
64 | 249 | * Gedit launcher icon on monitor 2 must have: | ||
65 | 250 | * An empty arrow on the left of the icon. | ||
66 | 251 | * Nothing on the right of the icon. | ||
67 | 252 | |||
68 | 253 | Actions: | ||
69 | 254 | * Move to workspace 3. | ||
70 | 255 | * Focus the gedit window on monitor 2. | ||
71 | 256 | |||
72 | 257 | Expected Results: | ||
73 | 258 | * Gedit launcher icon on monitor 1 must have: | ||
74 | 259 | * An empty arrow on the left of the icon. | ||
75 | 260 | * Nothing on the right of the icon. | ||
76 | 261 | * Gedit launcher icon on monitor 2 must have: | ||
77 | 262 | * A filled-in arrow on the left of the icon. | ||
78 | 263 | * A filled-in arrow on the right of the icon. | ||
79 | 264 | |||
80 | 265 | Actions: | ||
81 | 266 | * Move to workspace 4. | ||
82 | 267 | |||
83 | 268 | Expected Results: | ||
84 | 269 | * Gedit launcher icon on monitor 1 must have: | ||
85 | 270 | * An empty arrow on the left of the icon. | ||
86 | 271 | * Nothing on the right of the icon. | ||
87 | 272 | * Gedit launcher icon on monitor 2 must have: | ||
88 | 273 | * An empty arrow on the left of the icon. | ||
89 | 274 | * Nothing on the right of the icon. | ||
90 | 275 | |||
91 | 276 | Test Single Launcher with Windows in Multiple Monitors | ||
92 | 277 | ------------------------------------------------------ | ||
93 | 278 | This test shows how the launcher should draw its icons when there are | ||
94 | 279 | application windows in multiple monitors. | ||
95 | 280 | |||
96 | 281 | Setup: | ||
97 | 282 | * Run CCSM and ensure that the unity option in "Experimental" -> | ||
98 | 283 | "Launcher Monitors" is set to "Primary Desktop" | ||
99 | 284 | |||
100 | 285 | Actions: | ||
101 | 286 | * Open 2 Gedit windows on monitor 1, workspace 1. | ||
102 | 287 | * Open 1 Gedit window on monitor 2, workspace 1. | ||
103 | 288 | * Focus one of the two gedit windows on monitor 1. | ||
104 | 289 | |||
105 | 290 | Expected Results: | ||
106 | 291 | * The launcher is placed only on primary monitor | ||
107 | 292 | * Gedit launcher icon must have: | ||
108 | 293 | * Three pips on the left of the icon. | ||
109 | 294 | * A filled-in arrow on the right of the icon. | ||
110 | 295 | |||
111 | 296 | |||
112 | 297 | Test Single Launcher with Windows in Multiple Monitors and Workspaces | ||
113 | 298 | --------------------------------------------------------------------- | ||
114 | 299 | This test shows how the launcher should draw its icons when there are | ||
115 | 300 | application windows in multiple monitors spreaded in multiple workspaces. | ||
116 | 301 | |||
117 | 302 | Setup: | ||
118 | 303 | * Run CCSM and ensure that the unity option in "Experimental" -> | ||
119 | 304 | "Launcher Monitors" is set to "Primary Desktop" | ||
120 | 305 | |||
121 | 306 | Actions: | ||
122 | 307 | * Open 1 Gedit window on monitor 1, workspace 1. | ||
123 | 308 | * Open 2 Gedit windows on monitor 2, workspace 1. | ||
124 | 309 | * Open 2 Gedit windows on monitor 1, workspace 2. | ||
125 | 310 | * Open 1 Gedit window on monitor 2, workspace 3. | ||
126 | 311 | * Move to workspace 1. | ||
127 | 312 | * Focus the gedit window on monitor 1. | ||
128 | 313 | |||
129 | 314 | Expected Results: | ||
130 | 315 | * The launcher is shown only on primary monitor | ||
131 | 316 | * Gedit launcher icon must have: | ||
132 | 317 | * Three pips on the left of the icon. | ||
133 | 318 | * A filled-in arrow on the right of the icon. | ||
134 | 319 | |||
135 | 320 | Actions: | ||
136 | 321 | * Move to workspace 2. | ||
137 | 322 | * Focus one of the two gedit windows on monitor 1. | ||
138 | 323 | |||
139 | 324 | Expected Results: | ||
140 | 325 | * Gedit launcher icon on monitor 1 must have: | ||
141 | 326 | * Two pips on the left of the icon. | ||
142 | 327 | * A filled-in arrow on the right of the icon. | ||
143 | 328 | |||
144 | 329 | Actions: | ||
145 | 330 | * Move to workspace 3. | ||
146 | 331 | * Focus the gedit window on monitor 2. | ||
147 | 332 | |||
148 | 333 | Expected Results: | ||
149 | 334 | * Gedit launcher icon on monitor 2 must have: | ||
150 | 335 | * A filled-in arrow on the left of the icon. | ||
151 | 336 | * A filled-in arrow on the right of the icon. | ||
152 | 337 | |||
153 | 338 | Actions: | ||
154 | 339 | * Move to workspace 4. | ||
155 | 340 | |||
156 | 341 | Expected Results: | ||
157 | 342 | * Gedit launcher icon on monitor 1 must have: | ||
158 | 343 | * An empty arrow on the left of the icon. | ||
159 | 344 | * Nothing on the right of the icon. | ||
160 | 345 | |||
161 | 346 | |||
162 | 193 | Panel appearance with overlays | 347 | Panel appearance with overlays |
163 | 194 | ------------------------------ | 348 | ------------------------------ |
164 | 195 | Setup: | 349 | Setup: |
165 | 196 | 350 | ||
166 | === modified file 'plugins/unityshell/src/AbstractLauncherIcon.h' | |||
167 | --- plugins/unityshell/src/AbstractLauncherIcon.h 2012-03-14 06:24:18 +0000 | |||
168 | +++ plugins/unityshell/src/AbstractLauncherIcon.h 2012-03-23 10:29:18 +0000 | |||
169 | @@ -147,7 +147,9 @@ | |||
170 | 147 | 147 | ||
171 | 148 | virtual std::vector<Window> WindowsForMonitor(int monitor) = 0; | 148 | virtual std::vector<Window> WindowsForMonitor(int monitor) = 0; |
172 | 149 | 149 | ||
174 | 150 | virtual std::string NameForWindow (Window window) = 0; | 150 | virtual std::vector<Window> WindowsOnViewport() = 0; |
175 | 151 | |||
176 | 152 | virtual std::string NameForWindow(Window window) = 0; | ||
177 | 151 | 153 | ||
178 | 152 | virtual const bool WindowVisibleOnMonitor(int monitor) = 0; | 154 | virtual const bool WindowVisibleOnMonitor(int monitor) = 0; |
179 | 153 | 155 | ||
180 | 154 | 156 | ||
181 | === modified file 'plugins/unityshell/src/BamfLauncherIcon.cpp' | |||
182 | --- plugins/unityshell/src/BamfLauncherIcon.cpp 2012-03-21 12:31:11 +0000 | |||
183 | +++ plugins/unityshell/src/BamfLauncherIcon.cpp 2012-03-23 10:29:18 +0000 | |||
184 | @@ -287,55 +287,71 @@ | |||
185 | 287 | ubus_server_send_message(ubus_server_get_default(), UBUS_LAUNCHER_ACTION_DONE, nullptr); | 287 | ubus_server_send_message(ubus_server_get_default(), UBUS_LAUNCHER_ACTION_DONE, nullptr); |
186 | 288 | } | 288 | } |
187 | 289 | 289 | ||
188 | 290 | std::vector<Window> BamfLauncherIcon::GetWindows(WindowFilterMask filter, int monitor) | ||
189 | 291 | { | ||
190 | 292 | std::vector<Window> results; | ||
191 | 293 | GList* children, *l; | ||
192 | 294 | WindowManager *wm = WindowManager::Default(); | ||
193 | 295 | |||
194 | 296 | monitor = (filter & WindowFilter::ON_ALL_MONITORS) ? -1 : monitor; | ||
195 | 297 | bool mapped = (filter & WindowFilter::MAPPED); | ||
196 | 298 | bool user_visible = (filter & WindowFilter::USER_VISIBLE); | ||
197 | 299 | bool current_desktop = (filter & WindowFilter::ON_CURRENT_DESKTOP); | ||
198 | 300 | |||
199 | 301 | children = bamf_view_get_children(BAMF_VIEW(_bamf_app.RawPtr())); | ||
200 | 302 | for (l = children; l; l = l->next) | ||
201 | 303 | { | ||
202 | 304 | if (!BAMF_IS_WINDOW(l->data)) | ||
203 | 305 | continue; | ||
204 | 306 | |||
205 | 307 | auto window = static_cast<BamfWindow*>(l->data); | ||
206 | 308 | auto view = static_cast<BamfView*>(l->data); | ||
207 | 309 | |||
208 | 310 | if ((monitor >= 0 && bamf_window_get_monitor(window) == monitor) || monitor < 0) | ||
209 | 311 | { | ||
210 | 312 | if ((user_visible && bamf_view_user_visible(view)) || !user_visible) | ||
211 | 313 | { | ||
212 | 314 | guint32 xid = bamf_window_get_xid(window); | ||
213 | 315 | |||
214 | 316 | if ((mapped && wm->IsWindowMapped(xid)) || !mapped) | ||
215 | 317 | { | ||
216 | 318 | if ((current_desktop && wm->IsWindowOnCurrentDesktop(xid)) || !current_desktop) | ||
217 | 319 | { | ||
218 | 320 | results.push_back(xid); | ||
219 | 321 | } | ||
220 | 322 | } | ||
221 | 323 | } | ||
222 | 324 | } | ||
223 | 325 | } | ||
224 | 326 | |||
225 | 327 | g_list_free(children); | ||
226 | 328 | return results; | ||
227 | 329 | } | ||
228 | 330 | |||
229 | 290 | std::vector<Window> BamfLauncherIcon::Windows() | 331 | std::vector<Window> BamfLauncherIcon::Windows() |
230 | 291 | { | 332 | { |
251 | 292 | std::vector<Window> results; | 333 | return GetWindows(WindowFilter::MAPPED|WindowFilter::ON_ALL_MONITORS); |
252 | 293 | GList* children, *l; | 334 | } |
253 | 294 | WindowManager *wm = WindowManager::Default(); | 335 | |
254 | 295 | 336 | std::vector<Window> BamfLauncherIcon::WindowsOnViewport() | |
255 | 296 | children = bamf_view_get_children(BAMF_VIEW(_bamf_app.RawPtr())); | 337 | { |
256 | 297 | for (l = children; l; l = l->next) | 338 | WindowFilterMask filter; |
257 | 298 | { | 339 | filter |= WindowFilter::MAPPED; |
258 | 299 | if (!BAMF_IS_WINDOW(l->data)) | 340 | filter |= WindowFilter::USER_VISIBLE; |
259 | 300 | continue; | 341 | filter |= WindowFilter::ON_CURRENT_DESKTOP; |
260 | 301 | 342 | filter |= WindowFilter::ON_ALL_MONITORS; | |
261 | 302 | Window xid = bamf_window_get_xid(static_cast<BamfWindow*>(l->data)); | 343 | |
262 | 303 | 344 | return GetWindows(filter); | |
243 | 304 | if (wm->IsWindowMapped(xid)) | ||
244 | 305 | { | ||
245 | 306 | results.push_back(xid); | ||
246 | 307 | } | ||
247 | 308 | } | ||
248 | 309 | |||
249 | 310 | g_list_free(children); | ||
250 | 311 | return results; | ||
263 | 312 | } | 345 | } |
264 | 313 | 346 | ||
265 | 314 | std::vector<Window> BamfLauncherIcon::WindowsForMonitor(int monitor) | 347 | std::vector<Window> BamfLauncherIcon::WindowsForMonitor(int monitor) |
266 | 315 | { | 348 | { |
290 | 316 | std::vector<Window> results; | 349 | WindowFilterMask filter; |
291 | 317 | GList* children, *l; | 350 | filter |= WindowFilter::MAPPED; |
292 | 318 | WindowManager *wm = WindowManager::Default(); | 351 | filter |= WindowFilter::USER_VISIBLE; |
293 | 319 | 352 | filter |= WindowFilter::ON_CURRENT_DESKTOP; | |
294 | 320 | children = bamf_view_get_children(BAMF_VIEW(_bamf_app.RawPtr())); | 353 | |
295 | 321 | for (l = children; l; l = l->next) | 354 | return GetWindows(filter, monitor); |
273 | 322 | { | ||
274 | 323 | if (!BAMF_IS_WINDOW(l->data)) | ||
275 | 324 | continue; | ||
276 | 325 | |||
277 | 326 | auto window = static_cast<BamfWindow*>(l->data); | ||
278 | 327 | if (bamf_window_get_monitor(window) == monitor) | ||
279 | 328 | { | ||
280 | 329 | guint32 xid = bamf_window_get_xid(window); | ||
281 | 330 | bool user_visible = bamf_view_user_visible(reinterpret_cast<BamfView*>(window)); | ||
282 | 331 | |||
283 | 332 | if (user_visible && wm->IsWindowMapped(xid) && wm->IsWindowOnCurrentDesktop(xid)) | ||
284 | 333 | results.push_back(xid); | ||
285 | 334 | } | ||
286 | 335 | } | ||
287 | 336 | |||
288 | 337 | g_list_free(children); | ||
289 | 338 | return results; | ||
296 | 339 | } | 355 | } |
297 | 340 | 356 | ||
298 | 341 | std::string BamfLauncherIcon::NameForWindow(Window window) | 357 | std::string BamfLauncherIcon::NameForWindow(Window window) |
299 | 342 | 358 | ||
300 | === modified file 'plugins/unityshell/src/BamfLauncherIcon.h' | |||
301 | --- plugins/unityshell/src/BamfLauncherIcon.h 2012-03-14 06:24:18 +0000 | |||
302 | +++ plugins/unityshell/src/BamfLauncherIcon.h 2012-03-23 10:29:18 +0000 | |||
303 | @@ -61,6 +61,7 @@ | |||
304 | 61 | virtual unsigned long long SwitcherPriority(); | 61 | virtual unsigned long long SwitcherPriority(); |
305 | 62 | 62 | ||
306 | 63 | std::vector<Window> Windows(); | 63 | std::vector<Window> Windows(); |
307 | 64 | std::vector<Window> WindowsOnViewport(); | ||
308 | 64 | std::vector<Window> WindowsForMonitor(int monitor); | 65 | std::vector<Window> WindowsForMonitor(int monitor); |
309 | 65 | std::string NameForWindow(Window window); | 66 | std::string NameForWindow(Window window); |
310 | 66 | 67 | ||
311 | @@ -87,6 +88,15 @@ | |||
312 | 87 | std::string GetName() const; | 88 | std::string GetName() const; |
313 | 88 | 89 | ||
314 | 89 | private: | 90 | private: |
315 | 91 | typedef unsigned long int WindowFilterMask; | ||
316 | 92 | enum WindowFilter | ||
317 | 93 | { | ||
318 | 94 | MAPPED = (1 << 0), | ||
319 | 95 | USER_VISIBLE = (1 << 1), | ||
320 | 96 | ON_CURRENT_DESKTOP = (1 << 2), | ||
321 | 97 | ON_ALL_MONITORS = (1 << 3), | ||
322 | 98 | }; | ||
323 | 99 | |||
324 | 90 | void EnsureWindowState(); | 100 | void EnsureWindowState(); |
325 | 91 | void EnsureMenuItemsReady(); | 101 | void EnsureMenuItemsReady(); |
326 | 92 | void UpdateDesktopFile(); | 102 | void UpdateDesktopFile(); |
327 | @@ -103,6 +113,7 @@ | |||
328 | 103 | 113 | ||
329 | 104 | bool OwnsWindow(Window w) const; | 114 | bool OwnsWindow(Window w) const; |
330 | 105 | 115 | ||
331 | 116 | std::vector<Window> GetWindows(WindowFilterMask filter, int monitor = -1); | ||
332 | 106 | const std::set<std::string>& GetSupportedTypes(); | 117 | const std::set<std::string>& GetSupportedTypes(); |
333 | 107 | 118 | ||
334 | 108 | 119 | ||
335 | 109 | 120 | ||
336 | === modified file 'plugins/unityshell/src/Launcher.cpp' | |||
337 | --- plugins/unityshell/src/Launcher.cpp 2012-03-23 02:22:04 +0000 | |||
338 | +++ plugins/unityshell/src/Launcher.cpp 2012-03-23 10:29:18 +0000 | |||
339 | @@ -939,7 +939,7 @@ | |||
340 | 939 | else | 939 | else |
341 | 940 | { | 940 | { |
342 | 941 | if (options()->show_for_all) | 941 | if (options()->show_for_all) |
344 | 942 | arg.window_indicators = std::max<int> (icon->Windows().size(), 1); | 942 | arg.window_indicators = std::max<int> (icon->WindowsOnViewport().size(), 1); |
345 | 943 | else | 943 | else |
346 | 944 | arg.window_indicators = std::max<int> (icon->WindowsForMonitor(monitor).size(), 1); | 944 | arg.window_indicators = std::max<int> (icon->WindowsForMonitor(monitor).size(), 1); |
347 | 945 | } | 945 | } |
348 | 946 | 946 | ||
349 | === modified file 'plugins/unityshell/src/LauncherIcon.h' | |||
350 | --- plugins/unityshell/src/LauncherIcon.h 2012-03-14 06:24:18 +0000 | |||
351 | +++ plugins/unityshell/src/LauncherIcon.h 2012-03-23 10:29:18 +0000 | |||
352 | @@ -102,11 +102,13 @@ | |||
353 | 102 | 102 | ||
354 | 103 | int SortPriority(); | 103 | int SortPriority(); |
355 | 104 | 104 | ||
361 | 105 | virtual std::vector<Window> Windows () { return std::vector<Window> (); } | 105 | virtual std::vector<Window> Windows() { return std::vector<Window> (); } |
362 | 106 | 106 | ||
363 | 107 | virtual std::vector<Window> WindowsForMonitor (int monitor) { return std::vector<Window> (); } | 107 | virtual std::vector<Window> WindowsOnViewport() { return std::vector<Window> (); } |
364 | 108 | 108 | ||
365 | 109 | virtual std::string NameForWindow (Window window) { return std::string(); } | 109 | virtual std::vector<Window> WindowsForMonitor(int monitor) { return std::vector<Window> (); } |
366 | 110 | |||
367 | 111 | virtual std::string NameForWindow(Window window) { return std::string(); } | ||
368 | 110 | 112 | ||
369 | 111 | const bool WindowVisibleOnMonitor(int monitor); | 113 | const bool WindowVisibleOnMonitor(int monitor); |
370 | 112 | 114 | ||
371 | 113 | 115 | ||
372 | === modified file 'plugins/unityshell/src/MockLauncherIcon.h' | |||
373 | --- plugins/unityshell/src/MockLauncherIcon.h 2012-03-14 06:24:18 +0000 | |||
374 | +++ plugins/unityshell/src/MockLauncherIcon.h 2012-03-23 10:29:18 +0000 | |||
375 | @@ -81,6 +81,22 @@ | |||
376 | 81 | return result; | 81 | return result; |
377 | 82 | } | 82 | } |
378 | 83 | 83 | ||
379 | 84 | std::vector<Window> WindowsOnViewport () | ||
380 | 85 | { | ||
381 | 86 | std::vector<Window> result; | ||
382 | 87 | |||
383 | 88 | result.push_back ((100 << 16) + 200); | ||
384 | 89 | result.push_back ((500 << 16) + 200); | ||
385 | 90 | result.push_back ((300 << 16) + 200); | ||
386 | 91 | result.push_back ((200 << 16) + 200); | ||
387 | 92 | result.push_back ((300 << 16) + 200); | ||
388 | 93 | result.push_back ((100 << 16) + 200); | ||
389 | 94 | result.push_back ((300 << 16) + 200); | ||
390 | 95 | result.push_back ((600 << 16) + 200); | ||
391 | 96 | |||
392 | 97 | return result; | ||
393 | 98 | } | ||
394 | 99 | |||
395 | 84 | std::vector<Window> WindowsForMonitor (int monitor) | 100 | std::vector<Window> WindowsForMonitor (int monitor) |
396 | 85 | { | 101 | { |
397 | 86 | std::vector<Window> result; | 102 | std::vector<Window> result; |
looks good, works good, I like it