Merge lp:~alan-griffiths/miral/fix-1616818 into lp:miral

Proposed by Alan Griffiths
Status: Merged
Approved by: Alan Griffiths
Approved revision: 333
Merged at revision: 335
Proposed branch: lp:~alan-griffiths/miral/fix-1616818
Merge into: lp:miral
Diff against target: 33 lines (+22/-1)
1 file modified
miral/basic_window_manager.cpp (+22/-1)
To merge this branch: bzr merge lp:~alan-griffiths/miral/fix-1616818
Reviewer Review Type Date Requested Status
Gerry Boland (community) Approve
Review via email: mp+305806@code.launchpad.net

Commit message

Impose rules for interactive window movement

Description of the change

Impose rules for interactive window movement. Vis:

"When a surface is moved interactively

"Regular, floating regular, dialog, and satellite surfaces should be user-movable. Popups, glosses, and tips should not be. Freestyle surfaces may or may not be, as specified by the app."

To post a comment you must log in.
Revision history for this message
Gerry Boland (gerboland) wrote :

Not worth a test?

review: Approve
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Not worth a test?

It is.

I'll land this as a bugfix and follow up with a test fixture for probing miral::WindowManagerTools behaviour with this as the first test.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'miral/basic_window_manager.cpp'
2--- miral/basic_window_manager.cpp 2016-09-07 20:23:20 +0000
3+++ miral/basic_window_manager.cpp 2016-09-15 09:34:03 +0000
4@@ -895,7 +895,28 @@
5
6 auto& window_info = info_for(window);
7
8- // placeholder - constrain onscreen
9+ // When a surface is moved interactively
10+ // -------------------------------------
11+ // Regular, floating regular, dialog, and satellite surfaces should be user-movable.
12+ // Popups, glosses, and tips should not be.
13+ // Freestyle surfaces may or may not be, as specified by the app.
14+ // Mir and Unity: Surfaces, input, and displays (v0.3)
15+ switch (window_info.type())
16+ {
17+ case mir_surface_type_normal: // regular
18+ case mir_surface_type_utility: // floating regular
19+ case mir_surface_type_dialog: // dialog
20+ case mir_surface_type_satellite:// satellite
21+ case mir_surface_type_freestyle:// freestyle
22+ break;
23+
24+ case mir_surface_type_gloss:
25+ case mir_surface_type_menu:
26+ case mir_surface_type_inputmethod:
27+ case mir_surface_type_tip:
28+ case mir_surface_types:
29+ return;
30+ }
31
32 switch (window_info.state())
33 {

Subscribers

People subscribed via source and target branches