Mir

Merge lp:~afrantzis/mir/fix-1466492-map-minimized-to-hidden into lp:mir

Proposed by Alexandros Frantzis
Status: Rejected
Rejected by: Alexandros Frantzis
Proposed branch: lp:~afrantzis/mir/fix-1466492-map-minimized-to-hidden
Merge into: lp:mir
Diff against target: 37 lines (+19/-0)
2 files modified
src/server/shell/canonical_window_manager.cpp (+2/-0)
tests/acceptance-tests/test_surface_modifications.cpp (+17/-0)
To merge this branch: bzr merge lp:~afrantzis/mir/fix-1466492-map-minimized-to-hidden
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Needs Fixing
Alberto Aguirre (community) Disapprove
Review via email: mp+262450@code.launchpad.net

Commit message

shell: Ensure mir_surface_state_minimized is always mapped to mir_surface_state_hidden by the CanonicalWindowManagerPolicy

Description of the change

shell: Ensure mir_surface_state_minimized is always mapped to mir_surface_state_hidden by the CanonicalWindowManagerPolicy

To post a comment you must log in.
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

I'd rather avoid mapping the state at all - this was a workaround I put it initially - but proposed fix here: https://code.launchpad.net/~albaguirre/mir/no-minimize-to-hidden-mapping/+merge/262465

review: Disapprove
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)

Unmerged revisions

2688. By Alexandros Frantzis

shell: Ensure mir_surface_state_minimized is always mapped to mir_surface_state_hidden by the CanonicalWindowManagerPolicy

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/server/shell/canonical_window_manager.cpp'
2--- src/server/shell/canonical_window_manager.cpp 2015-06-17 13:12:33 +0000
3+++ src/server/shell/canonical_window_manager.cpp 2015-06-19 14:22:21 +0000
4@@ -448,6 +448,8 @@
5
6 if (info.state == value)
7 {
8+ if (info.state == mir_surface_state_minimized)
9+ return mir_surface_state_hidden;
10 return info.state;
11 }
12
13
14=== modified file 'tests/acceptance-tests/test_surface_modifications.cpp'
15--- tests/acceptance-tests/test_surface_modifications.cpp 2015-06-17 05:20:42 +0000
16+++ tests/acceptance-tests/test_surface_modifications.cpp 2015-06-19 14:22:21 +0000
17@@ -486,3 +486,20 @@
18 EXPECT_THAT(actual, Eq(expected_size));
19 };
20 }
21+
22+TEST_F(SurfaceModifications, minimized_state_is_mapped_to_hidden)
23+{
24+ EXPECT_THAT(mir_surface_get_state(surface), Ne(mir_surface_state_hidden));
25+
26+ mir_wait_for(mir_surface_set_state(surface, mir_surface_state_minimized));
27+ EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_hidden));
28+}
29+
30+TEST_F(SurfaceModifications, minimized_state_is_mapped_to_hidden_when_already_minimized)
31+{
32+ mir_wait_for(mir_surface_set_state(surface, mir_surface_state_minimized));
33+ EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_hidden));
34+
35+ mir_wait_for(mir_surface_set_state(surface, mir_surface_state_minimized));
36+ EXPECT_THAT(mir_surface_get_state(surface), Eq(mir_surface_state_hidden));
37+}

Subscribers

People subscribed via source and target branches