Merge lp:~3v1n0/unity/show-shell-on-menu-open into lp:unity
- show-shell-on-menu-open
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Andrea Azzarone | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 4005 | ||||
Proposed branch: | lp:~3v1n0/unity/show-shell-on-menu-open | ||||
Merge into: | lp:unity | ||||
Prerequisite: | lp:~azzar1/unity/lp-1485559 | ||||
Diff against target: |
430 lines (+101/-24) 16 files modified
UnityCore/Indicators.cpp (+6/-3) UnityCore/Indicators.h (+1/-0) panel/PanelMenuView.cpp (+10/-2) panel/PanelMenuView.h (+1/-0) plugins/unityshell/src/unityshell.cpp (+22/-8) tests/autopilot/unity/emulators/launcher.py (+4/-4) tests/autopilot/unity/tests/launcher/test_icon_behavior.py (+10/-4) tests/autopilot/unity/tests/test_panel.py (+2/-2) tests/test_indicators.cpp (+2/-0) unity-shared/MenuManager.cpp (+7/-0) unity-shared/MenuManager.h (+1/-0) unity-shared/PluginAdapter.cpp (+18/-0) unity-shared/PluginAdapter.h (+1/-0) unity-shared/StandaloneWindowManager.cpp (+11/-1) unity-shared/StandaloneWindowManager.h (+2/-0) unity-shared/WindowManager.h (+3/-0) |
||||
To merge this branch: | bzr merge lp:~3v1n0/unity/show-shell-on-menu-open | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andrea Azzarone (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Needs Fixing | |
Christopher Townsend | Pending | ||
Review via email: mp+270661@code.launchpad.net |
This proposal supersedes a proposal from 2015-06-08.
Commit message
UnityScreen: force shell to be on top when there's a window fullscreen and we've a menu open.
This allows to see the panel and control menus properly. Added support for fullscreen
windows to WindowsManager, in order to handle properly the LIM mode.
Description of the change
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal | # |
This breaks many AP tests:
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
unity.tests.
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
So, I've been trying to run these tests again one-by-one, but None failed, except for:
unity.tests.
That I've fixed (in LIM mode should behave differently).
unity.tests.
Which failed because after some time, it seems that AP stresses the Alt+F4 keybinding too much and compiz gets confused... But I don't see any of these failures to be related to this branch.
Can you please check if the failures were accidental (or provide me more precise logs)?
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3970
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Marco Trevisan (Treviño) (3v1n0) wrote : Posted in a previous version of this proposal | # |
New build failures are caused by new gtk in Wily, I'll fix this in a new branch.
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal | # |
Actually, upon further investigation and testing, I had the new bamf from the ci-train silo installed, I'm 99% sure this is what is causing the slew of failures.
I'm going to remove that bamf and rebuild and see if it looks better.
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal | # |
Ok, this MP is not the culprit of the AP failures, so going to approve.
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3970
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : Posted in a previous version of this proposal | # |
FAILED: Continuous integration, rev:3971
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Christopher Townsend (townsend) wrote : Posted in a previous version of this proposal | # |
Setting this to WiP since it doesn't compile.
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3974
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
PS Jenkins bot (ps-jenkins) wrote : | # |
FAILED: Continuous integration, rev:3975
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
FAILURE: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'UnityCore/Indicators.cpp' |
2 | --- UnityCore/Indicators.cpp 2015-01-29 18:23:24 +0000 |
3 | +++ UnityCore/Indicators.cpp 2015-09-10 13:24:56 +0000 |
4 | @@ -27,9 +27,8 @@ |
5 | namespace indicator |
6 | { |
7 | |
8 | -class Indicators::Impl |
9 | +struct Indicators::Impl |
10 | { |
11 | -public: |
12 | typedef std::unordered_map<std::string, Indicator::Ptr> IndicatorMap; |
13 | |
14 | Impl(Indicators* owner) |
15 | @@ -49,7 +48,6 @@ |
16 | |
17 | Entry::Ptr GetEntry(std::string const& entry_id); |
18 | |
19 | -private: |
20 | Indicators* owner_; |
21 | IndicatorMap indicators_; |
22 | Entry::Ptr active_entry_; |
23 | @@ -93,6 +91,11 @@ |
24 | return pimpl->RemoveIndicator(name); |
25 | } |
26 | |
27 | +Entry::Ptr const& Indicators::GetActiveEntry() const |
28 | +{ |
29 | + return pimpl->active_entry_; |
30 | +} |
31 | + |
32 | void Indicators::Impl::ActivateEntry(std::string const& panel, std::string const& entry_id, nux::Rect const& geometry) |
33 | { |
34 | if (active_entry_) |
35 | |
36 | === modified file 'UnityCore/Indicators.h' |
37 | --- UnityCore/Indicators.h 2014-09-19 18:48:04 +0000 |
38 | +++ UnityCore/Indicators.h 2015-09-10 13:24:56 +0000 |
39 | @@ -40,6 +40,7 @@ |
40 | virtual ~Indicators(); |
41 | |
42 | IndicatorsList GetIndicators() const; |
43 | + Entry::Ptr const& GetActiveEntry() const; |
44 | virtual std::vector<std::string> const& IconPaths() const = 0; |
45 | |
46 | virtual void SyncGeometries(std::string const& panel, EntryLocationMap const&) = 0; |
47 | |
48 | === modified file 'panel/PanelMenuView.cpp' |
49 | --- panel/PanelMenuView.cpp 2015-09-10 13:24:56 +0000 |
50 | +++ panel/PanelMenuView.cpp 2015-09-10 13:24:56 +0000 |
51 | @@ -222,6 +222,8 @@ |
52 | wm.window_unminimized.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowUnminimized)); |
53 | wm.window_maximized.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowMaximized)); |
54 | wm.window_restored.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowRestored)); |
55 | + wm.window_fullscreen.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowMaximized)); |
56 | + wm.window_unfullscreen.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowUnFullscreen)); |
57 | wm.window_unmapped.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowUnmapped)); |
58 | wm.window_mapped.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowMapped)); |
59 | wm.window_moved.connect(sigc::mem_fun(this, &PanelMenuView::OnWindowMoved)); |
60 | @@ -1099,7 +1101,7 @@ |
61 | if (new_win) |
62 | { |
63 | active_xid = new_win->window_id(); |
64 | - is_maximized_ = new_win->maximized(); |
65 | + is_maximized_ = new_win->maximized() || WindowManager::Default().IsWindowFullscreen(active_xid); |
66 | |
67 | if (new_win->type() == WindowType::DESKTOP) |
68 | { |
69 | @@ -1238,6 +1240,12 @@ |
70 | } |
71 | } |
72 | |
73 | +void PanelMenuView::OnWindowUnFullscreen(Window xid) |
74 | +{ |
75 | + if (!WindowManager::Default().IsWindowMaximized(xid)) |
76 | + OnWindowRestored(xid); |
77 | +} |
78 | + |
79 | void PanelMenuView::OnWindowRestored(Window xid) |
80 | { |
81 | maximized_wins_.erase(std::remove(maximized_wins_.begin(), maximized_wins_.end(), xid), maximized_wins_.end()); |
82 | @@ -1743,7 +1751,7 @@ |
83 | if (win->active()) |
84 | active_window = xid; |
85 | |
86 | - if (win->maximized()) |
87 | + if (win->maximized() || WindowManager::Default().IsWindowFullscreen(xid)) |
88 | { |
89 | if (win->active()) |
90 | maximized_wins_.push_front(xid); |
91 | |
92 | === modified file 'panel/PanelMenuView.h' |
93 | --- panel/PanelMenuView.h 2015-09-10 13:24:56 +0000 |
94 | +++ panel/PanelMenuView.h 2015-09-10 13:24:56 +0000 |
95 | @@ -105,6 +105,7 @@ |
96 | void OnWindowMapped(Window xid); |
97 | void OnWindowMaximized(Window xid); |
98 | void OnWindowRestored(Window xid); |
99 | + void OnWindowUnFullscreen(Window xid); |
100 | void OnWindowMoved(Window xid); |
101 | void OnShowDesktopChanged(); |
102 | |
103 | |
104 | === modified file 'plugins/unityshell/src/unityshell.cpp' |
105 | --- plugins/unityshell/src/unityshell.cpp 2015-09-10 13:24:56 +0000 |
106 | +++ plugins/unityshell/src/unityshell.cpp 2015-09-10 13:24:56 +0000 |
107 | @@ -986,14 +986,28 @@ |
108 | |
109 | bool UnityScreen::forcePaintOnTop() |
110 | { |
111 | - return !allowWindowPaint || |
112 | - lockscreen_controller_->IsLocked() || |
113 | - (dash_controller_->IsVisible() && !nux::GetGraphicsDisplay()->PointerIsGrabbed()) || |
114 | - hud_controller_->IsVisible() || |
115 | - session_controller_->Visible() || |
116 | - ((switcher_controller_->Visible() || |
117 | - WM.IsExpoActive()) |
118 | - && !fullscreen_windows_.empty () && (!(screen->grabbed () && !screen->otherGrabExist (NULL)))); |
119 | + if (!allowWindowPaint || |
120 | + lockscreen_controller_->IsLocked() || |
121 | + (dash_controller_->IsVisible() && !nux::GetGraphicsDisplay()->PointerIsGrabbed()) || |
122 | + hud_controller_->IsVisible() || |
123 | + session_controller_->Visible()) |
124 | + { |
125 | + return true; |
126 | + } |
127 | + |
128 | + if (!fullscreen_windows_.empty()) |
129 | + { |
130 | + if (menus_->menu_open()) |
131 | + return true; |
132 | + |
133 | + if (switcher_controller_->Visible() || WM.IsExpoActive()) |
134 | + { |
135 | + if (!screen->grabbed() || screen->otherGrabExist(nullptr)) |
136 | + return true; |
137 | + } |
138 | + } |
139 | + |
140 | + return false; |
141 | } |
142 | |
143 | void UnityScreen::EnableCancelAction(CancelActionTarget target, bool enabled, int modifiers) |
144 | |
145 | === modified file 'tests/autopilot/unity/emulators/launcher.py' |
146 | --- tests/autopilot/unity/emulators/launcher.py 2015-08-18 15:07:31 +0000 |
147 | +++ tests/autopilot/unity/emulators/launcher.py 2015-09-10 13:24:56 +0000 |
148 | @@ -378,11 +378,11 @@ |
149 | |
150 | self.move_mouse_to_icon(icon) |
151 | self._mouse.press() |
152 | - sleep(2) |
153 | + sleep(1) |
154 | |
155 | if drag_type == IconDragType.OUTSIDE: |
156 | shift_over = self._mouse.x + (icon_height * 2) |
157 | - self._mouse.move(shift_over, self._mouse.y) |
158 | + self._mouse.move(shift_over, self._mouse.y, rate=20, time_between_events=0.005) |
159 | sleep(0.5) |
160 | |
161 | self.move_mouse_to_icon(target) |
162 | @@ -393,8 +393,8 @@ |
163 | if pos == IconDragType.BEFORE: |
164 | target_y -= icon_height + (icon_height / 2) |
165 | |
166 | - self._mouse.move(self._mouse.x, target_y) |
167 | - sleep(0.5) |
168 | + self._mouse.move(self._mouse.x, target_y, rate=20, time_between_events=0.005) |
169 | + sleep(1) |
170 | self._mouse.release() |
171 | self.move_mouse_to_right_of_launcher() |
172 | |
173 | |
174 | === modified file 'tests/autopilot/unity/tests/launcher/test_icon_behavior.py' |
175 | --- tests/autopilot/unity/tests/launcher/test_icon_behavior.py 2015-08-18 10:08:57 +0000 |
176 | +++ tests/autopilot/unity/tests/launcher/test_icon_behavior.py 2015-09-10 13:24:56 +0000 |
177 | @@ -60,6 +60,11 @@ |
178 | self.assertThat(lambda: self.process_manager.app_is_running("Calculator"), Eventually(Equals(False))) |
179 | return calc_icon |
180 | |
181 | + def get_running_application_by_desktop_file(self, desktop_id): |
182 | + get_app_fn = lambda: self.process_manager.get_running_applications_by_desktop_file(desktop_id) |
183 | + self.assertThat(lambda: len(get_app_fn()), Eventually(Equals(1))) |
184 | + return get_app_fn()[0] |
185 | + |
186 | def test_bfb_tooltip_disappear_when_dash_is_opened(self): |
187 | """Tests that the bfb tooltip disappear when the dash is opened.""" |
188 | bfb = self.unity.launcher.model.get_bfb_icon() |
189 | @@ -139,7 +144,7 @@ |
190 | self.addCleanup(self.process_manager.close_all_app, "Calculator") |
191 | self.launcher_instance.click_launcher_icon(calc_icon) |
192 | |
193 | - calc_app = self.process_manager.get_running_applications_by_desktop_file(calc_icon.desktop_id)[0] |
194 | + calc_app = self.get_running_application_by_desktop_file(calc_icon.desktop_id) |
195 | calc_window = calc_app.get_windows()[0] |
196 | |
197 | self.assertThat(lambda: self.get_startup_notification_timestamp(calc_window), Eventually(Equals(calc_icon.startup_notification_timestamp))) |
198 | @@ -197,8 +202,8 @@ |
199 | self.addCleanup(self.launcher_instance.keyboard_unreveal_launcher) |
200 | self.keyboard.press_and_release("1"); |
201 | |
202 | - calc_app = self.process_manager.get_running_applications_by_desktop_file(calc_icon.desktop_id)[0] |
203 | - calc_window = calc_app.get_windows()[0] |
204 | + calc_app = self.get_running_application_by_desktop_file(calc_icon.desktop_id) |
205 | + [calc_window] = calc_app.get_windows() |
206 | |
207 | self.assertThat(lambda: calc_window.is_focused, Eventually(Equals(True))) |
208 | |
209 | @@ -411,7 +416,8 @@ |
210 | self.drag_type) |
211 | |
212 | # Must be the last bamf icon - not necessarily the third-from-end icon. |
213 | - refresh_fn = lambda: self.unity.launcher.model.get_launcher_icons()[-2].id |
214 | + expected_pos = -2 if self.workspace.num_workspaces < 2 else -1 |
215 | + refresh_fn = lambda: self.unity.launcher.model.get_launcher_icons()[expected_pos].id |
216 | self.assertThat(refresh_fn, |
217 | Eventually(Equals(calc_icon.id)), |
218 | "Launcher icons are: %r" % self.unity.launcher.model.get_launcher_icons()) |
219 | |
220 | === modified file 'tests/autopilot/unity/tests/test_panel.py' |
221 | --- tests/autopilot/unity/tests/test_panel.py 2015-08-19 11:15:42 +0000 |
222 | +++ tests/autopilot/unity/tests/test_panel.py 2015-09-10 13:24:56 +0000 |
223 | @@ -1033,7 +1033,7 @@ |
224 | self.assertThat(menu_entry.menu_y, Eventually(Equals(0))) |
225 | |
226 | def test_menu_closes_on_new_focused_application(self): |
227 | - """Clicking outside an open menu must close it.""" |
228 | + """When a new app is focused, open menu should be closed only when using Global Menus.""" |
229 | menu_entry = self.open_app_and_get_menu_entry() |
230 | self.mouse_open_indicator(menu_entry) |
231 | |
232 | @@ -1042,7 +1042,7 @@ |
233 | |
234 | self.open_new_application_window("Text Editor") |
235 | get_active_indicator_fn = lambda: self.unity.panels.get_active_indicator() |
236 | - self.assertThat(get_active_indicator_fn, Eventually(Equals(None))) |
237 | + self.assertThat(get_active_indicator_fn, Eventually(NotEquals(None) if self.lim else Equals(None))) |
238 | |
239 | def test_indicator_opens_when_dash_is_open(self): |
240 | """When the dash is open and a click is on an indicator the dash |
241 | |
242 | === modified file 'tests/test_indicators.cpp' |
243 | --- tests/test_indicators.cpp 2014-12-19 17:26:43 +0000 |
244 | +++ tests/test_indicators.cpp 2015-09-10 13:24:56 +0000 |
245 | @@ -216,6 +216,7 @@ |
246 | |
247 | // Activating Entries from the Indicators class to see if they get updated |
248 | ASSERT_THAT(indicators.GetIndicator("indicator-test-1"), NotNull()); |
249 | + ASSERT_THAT(indicators.GetActiveEntry(), IsNull()); |
250 | |
251 | Entry::Ptr entry12(indicators.GetIndicator("indicator-test-1")->GetEntry("indicator-test-1|entry-2")); |
252 | ASSERT_THAT(entry12, NotNull()); |
253 | @@ -227,6 +228,7 @@ |
254 | |
255 | EXPECT_EQ(entry12->active(), true); |
256 | EXPECT_EQ(entry12->geometry(), nux::Rect(1, 2, 3, 4)); |
257 | + EXPECT_EQ(indicators.GetActiveEntry(), entry12); |
258 | } |
259 | |
260 | TEST_F(TestIndicators, ActivateEntryShouldDisactivatePrevious) |
261 | |
262 | === modified file 'unity-shared/MenuManager.cpp' |
263 | --- unity-shared/MenuManager.cpp 2015-04-20 14:50:48 +0000 |
264 | +++ unity-shared/MenuManager.cpp 2015-09-10 13:24:56 +0000 |
265 | @@ -61,6 +61,7 @@ |
266 | indicators_->on_object_added.connect(sigc::mem_fun(this, &Impl::AddIndicator)); |
267 | indicators_->on_object_removed.connect(sigc::mem_fun(this, &Impl::RemoveIndicator)); |
268 | indicators_->on_entry_activate_request.connect(sigc::mem_fun(this, &Impl::ActivateRequest)); |
269 | + indicators_->on_entry_activated.connect(sigc::mem_fun(this, &Impl::EntryActivated)); |
270 | indicators_->icon_paths_changed.connect(sigc::mem_fun(this, &Impl::IconPathsChanged)); |
271 | WindowManager::Default().window_focus_changed.connect(sigc::hide(sigc::mem_fun(this, &Impl::GrabMnemonicsForActiveWindow))); |
272 | |
273 | @@ -73,6 +74,7 @@ |
274 | |
275 | parent_->integrated_menus = g_settings_get_boolean(settings_, LIM_KEY.c_str()); |
276 | parent_->always_show_menus = g_settings_get_boolean(settings_, ALWAYS_SHOW_MENUS_KEY.c_str()); |
277 | + parent_->menu_open = indicators_->GetActiveEntry() != nullptr; |
278 | } |
279 | |
280 | ~Impl() |
281 | @@ -175,6 +177,11 @@ |
282 | parent_->key_activate_entry.emit(entry_id); |
283 | } |
284 | |
285 | + void EntryActivated(std::string const&, std::string const&, nux::Rect const& geo) |
286 | + { |
287 | + parent_->menu_open = !geo.IsNull(); |
288 | + } |
289 | + |
290 | void SetShowNowForWindow(Window xid, bool show) |
291 | { |
292 | if (!appmenu_) |
293 | |
294 | === modified file 'unity-shared/MenuManager.h' |
295 | --- unity-shared/MenuManager.h 2014-12-19 13:03:44 +0000 |
296 | +++ unity-shared/MenuManager.h 2015-09-10 13:24:56 +0000 |
297 | @@ -46,6 +46,7 @@ |
298 | typedef std::shared_ptr<Manager> Ptr; |
299 | |
300 | nux::Property<bool> show_menus; |
301 | + nux::Property<bool> menu_open; |
302 | |
303 | nux::Property<bool> integrated_menus; |
304 | nux::Property<unsigned> show_menus_wait; |
305 | |
306 | === modified file 'unity-shared/PluginAdapter.cpp' |
307 | --- unity-shared/PluginAdapter.cpp 2015-05-29 12:30:36 +0000 |
308 | +++ unity-shared/PluginAdapter.cpp 2015-09-10 13:24:56 +0000 |
309 | @@ -145,6 +145,16 @@ |
310 | { |
311 | window_restored.emit(window->id()); |
312 | } |
313 | + |
314 | + if ((state & CompWindowStateFullscreenMask) == CompWindowStateFullscreenMask) |
315 | + { |
316 | + window_fullscreen.emit(window->id()); |
317 | + } |
318 | + else if (((last_state & CompWindowStateFullscreenMask) == CompWindowStateFullscreenMask) && |
319 | + !((state & CompWindowStateFullscreenMask) == CompWindowStateFullscreenMask)) |
320 | + { |
321 | + window_unfullscreen.emit(window->id()); |
322 | + } |
323 | } |
324 | |
325 | void PluginAdapter::Notify(CompWindow* window, CompWindowNotify notify) |
326 | @@ -530,6 +540,14 @@ |
327 | return false; |
328 | } |
329 | |
330 | +bool PluginAdapter::IsWindowFullscreen(Window window_id) const |
331 | +{ |
332 | + if (CompWindow* window = m_Screen->findWindow(window_id)) |
333 | + return ((window->state() & CompWindowStateFullscreenMask) == CompWindowStateFullscreenMask); |
334 | + |
335 | + return false; |
336 | +} |
337 | + |
338 | bool PluginAdapter::HasWindowDecorations(Window window_id) const |
339 | { |
340 | return compiz_utils::IsWindowFullyDecorable(m_Screen->findWindow(window_id)); |
341 | |
342 | === modified file 'unity-shared/PluginAdapter.h' |
343 | --- unity-shared/PluginAdapter.h 2015-02-03 09:46:48 +0000 |
344 | +++ unity-shared/PluginAdapter.h 2015-09-10 13:24:56 +0000 |
345 | @@ -122,6 +122,7 @@ |
346 | bool IsWindowMaximized(Window window_id) const; |
347 | bool IsWindowVerticallyMaximized(Window window_id) const; |
348 | bool IsWindowHorizontallyMaximized(Window window_id) const; |
349 | + bool IsWindowFullscreen(Window window_id) const; |
350 | bool IsWindowDecorated(Window window_id) const; |
351 | bool IsWindowOnCurrentDesktop(Window window_id) const; |
352 | bool IsWindowObscured(Window window_id) const; |
353 | |
354 | === modified file 'unity-shared/StandaloneWindowManager.cpp' |
355 | --- unity-shared/StandaloneWindowManager.cpp 2015-02-27 15:38:11 +0000 |
356 | +++ unity-shared/StandaloneWindowManager.cpp 2015-09-10 13:24:56 +0000 |
357 | @@ -128,7 +128,7 @@ |
358 | |
359 | return ret; |
360 | } |
361 | - |
362 | + |
363 | int StandaloneWindowManager::MonitorGeometryIn(nux::Geometry const& geo) const |
364 | { |
365 | // TODO |
366 | @@ -168,6 +168,15 @@ |
367 | return false; |
368 | } |
369 | |
370 | +bool StandaloneWindowManager::IsWindowFullscreen(Window window_id) const |
371 | +{ |
372 | + auto window = GetWindowByXid(window_id); |
373 | + if (window) |
374 | + return window->fullscreen; |
375 | + |
376 | + return false; |
377 | +} |
378 | + |
379 | bool StandaloneWindowManager::IsWindowDecorated(Window window_id) const |
380 | { |
381 | auto window = GetWindowByXid(window_id); |
382 | @@ -708,6 +717,7 @@ |
383 | window->visible.changed.connect([this, xid] (bool v) {v ? window_shown(xid) : window_hidden(xid);}); |
384 | window->maximized.changed.connect([this, xid] (bool v) {v ? window_maximized(xid) : window_restored(xid);}); |
385 | window->minimized.changed.connect([this, xid] (bool v) {v ? window_minimized(xid) : window_unminimized(xid);}); |
386 | + window->fullscreen.changed.connect([this, xid] (bool v) {v ? window_fullscreen(xid) : window_unfullscreen(xid);}); |
387 | window->geo.changed.connect([this, xid] (nux::Geometry const&) { window_resized(xid); window_moved(xid); }); |
388 | window->resized.connect([this, xid] { window_resized(xid); }); |
389 | window->moved.connect([this, xid] { window_moved(xid); }); |
390 | |
391 | === modified file 'unity-shared/StandaloneWindowManager.h' |
392 | --- unity-shared/StandaloneWindowManager.h 2015-01-21 15:28:59 +0000 |
393 | +++ unity-shared/StandaloneWindowManager.h 2015-09-10 13:24:56 +0000 |
394 | @@ -51,6 +51,7 @@ |
395 | nux::RWProperty<bool> maximized; |
396 | nux::Property<bool> v_maximized; |
397 | nux::Property<bool> h_maximized; |
398 | + nux::Property<bool> fullscreen; |
399 | nux::Property<bool> minimized; |
400 | nux::Property<bool> shaded; |
401 | nux::Property<bool> decorated; |
402 | @@ -78,6 +79,7 @@ |
403 | virtual bool IsWindowMaximized(Window window_id) const; |
404 | virtual bool IsWindowVerticallyMaximized(Window window_id) const; |
405 | virtual bool IsWindowHorizontallyMaximized(Window window_id) const; |
406 | + virtual bool IsWindowFullscreen(Window window_id) const; |
407 | virtual bool IsWindowDecorated(Window window_id) const; |
408 | virtual bool IsWindowOnCurrentDesktop(Window window_id) const; |
409 | virtual bool IsWindowObscured(Window window_id) const; |
410 | |
411 | === modified file 'unity-shared/WindowManager.h' |
412 | --- unity-shared/WindowManager.h 2015-01-21 15:28:59 +0000 |
413 | +++ unity-shared/WindowManager.h 2015-09-10 13:24:56 +0000 |
414 | @@ -83,6 +83,7 @@ |
415 | virtual bool IsWindowMaximized(Window window_id) const = 0; |
416 | virtual bool IsWindowVerticallyMaximized(Window window_id) const = 0; |
417 | virtual bool IsWindowHorizontallyMaximized(Window window_id) const = 0; |
418 | + virtual bool IsWindowFullscreen(Window window_id) const = 0; |
419 | virtual bool IsWindowDecorated(Window window_id) const = 0; |
420 | virtual bool IsWindowOnCurrentDesktop(Window window_id) const = 0; |
421 | virtual bool IsWindowObscured(Window window_id) const = 0; |
422 | @@ -185,6 +186,8 @@ |
423 | sigc::signal<void, Window> window_restored; |
424 | sigc::signal<void, Window> window_minimized; |
425 | sigc::signal<void, Window> window_unminimized; |
426 | + sigc::signal<void, Window> window_fullscreen; |
427 | + sigc::signal<void, Window> window_unfullscreen; |
428 | sigc::signal<void, Window> window_shaded; |
429 | sigc::signal<void, Window> window_unshaded; |
430 | sigc::signal<void, Window> window_shown; |
PASSED: Continuous integration, rev:3969 jenkins. qa.ubuntu. com/job/ unity-ci/ 1250/ jenkins. qa.ubuntu. com/job/ unity-wily- amd64-ci/ 28 jenkins. qa.ubuntu. com/job/ unity-wily- armhf-ci/ 26 jenkins. qa.ubuntu. com/job/ unity-wily- i386-ci/ 26
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/unity- ci/1250/ rebuild
http://