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
=== modified file 'miral/basic_window_manager.cpp'
--- miral/basic_window_manager.cpp 2016-09-07 20:23:20 +0000
+++ miral/basic_window_manager.cpp 2016-09-15 09:34:03 +0000
@@ -895,7 +895,28 @@
895895
896 auto& window_info = info_for(window);896 auto& window_info = info_for(window);
897897
898 // placeholder - constrain onscreen898 // When a surface is moved interactively
899 // -------------------------------------
900 // Regular, floating regular, dialog, and satellite surfaces should be user-movable.
901 // Popups, glosses, and tips should not be.
902 // Freestyle surfaces may or may not be, as specified by the app.
903 // Mir and Unity: Surfaces, input, and displays (v0.3)
904 switch (window_info.type())
905 {
906 case mir_surface_type_normal: // regular
907 case mir_surface_type_utility: // floating regular
908 case mir_surface_type_dialog: // dialog
909 case mir_surface_type_satellite:// satellite
910 case mir_surface_type_freestyle:// freestyle
911 break;
912
913 case mir_surface_type_gloss:
914 case mir_surface_type_menu:
915 case mir_surface_type_inputmethod:
916 case mir_surface_type_tip:
917 case mir_surface_types:
918 return;
919 }
899920
900 switch (window_info.state())921 switch (window_info.state())
901 {922 {

Subscribers

People subscribed via source and target branches