Class FloatingWindowManager¶
Defined in File floating_window_manager.h
Inheritance Relationships¶
Base Type¶
public miral::CanonicalWindowManagerPolicy(Class CanonicalWindowManagerPolicy)
Class Documentation¶
-
class FloatingWindowManager : public miral::CanonicalWindowManagerPolicy¶
A minimal floating window management policy.
This policy provides the following features:
A stacking, floating window management policy
The ability to move and resize windows
Touchscreen support
Alt + F4 keybind to close windows
Focus stealing management
Compositor authors may elect to use this class as provided or subclass it in order to extend the base functionality.
This class is the successor to miral::MinimalWindowManager.
Remark
Since MirAL 5.6
Public Functions
-
explicit FloatingWindowManager(WindowManagerTools const &tools)¶
-
FloatingWindowManager(WindowManagerTools const &tools, FocusStealing focus_stealing, MirInputEventModifier pointer_drag_modifier)¶
-
~FloatingWindowManager() override¶
-
virtual void handle_window_ready(WindowInfo &window_info) override¶
Focuses the window if it can receive focus.
- Parameters:
window_info – the ready window
-
virtual bool handle_keyboard_event(MirKeyboardEvent const *event) override¶
Handles Alt-F4 to close the active window.
- Parameters:
event – keyboard event
- Returns:
trueif the event was handled, otherwisefalse
-
virtual bool handle_touch_event(MirTouchEvent const *event) override¶
Handles touch to focus, resizing wndows with touch, and moving windows with touch.
- Parameters:
event – touch event
- Returns:
trueif the event was handled, otherwisefalse
-
virtual bool handle_pointer_event(MirPointerEvent const *event) override¶
Handles focus selection, resizing windows with the pointer, and moving windows with the pointer.
- Parameters:
event – pointer events
- Returns:
trueif the event was handled, otherwisefalse
-
virtual void handle_request_move(WindowInfo &window_info, MirInputEvent const *input_event) override¶
Initiates a move gesture from the client.
This is only implemented for pointers.
- Parameters:
window_info – the window being moved
input_event – the input event that caused the movement
-
virtual void handle_request_resize(WindowInfo &window_info, MirInputEvent const *input_event, MirResizeEdge edge) override¶
Initiates a resize gesture from the client.
This is only implemented for pointers.
- Parameters:
window_info – the window being resized
input_event – the input event that causes the resize
edge – the edge from which the resize happens
-
virtual void advise_focus_gained(WindowInfo const &window_info) override¶
Raises the provided window on focus.
- Parameters:
window_info – the window receiving focus
-
virtual void advise_new_window(WindowInfo const &window_info) override¶
Raises the window based on the miral::FocusStealing of the policy.
- Parameters:
window_info – the new window
Protected Functions
-
bool begin_pointer_move(WindowInfo const &window_info, MirInputEvent const *input_event)¶
-
bool begin_pointer_resize(WindowInfo const &window_info, MirInputEvent const *input_event, MirResizeEdge const &edge)¶
-
bool begin_touch_move(WindowInfo const &window_info, MirInputEvent const *input_event)¶
-
bool begin_touch_resize(WindowInfo const &window_info, MirInputEvent const *input_event, MirResizeEdge const &edge)¶