Class FloatingWindowManagerPolicy

Inheritance Relationships

Base Type

Class Documentation

class FloatingWindowManagerPolicy : public miral::MinimalWindowManager

example event handling:

o Switch apps: Alt+Tab, tap or click on the corresponding window o Switch window: Alt+`, tap or click on the corresponding window o Move window: Alt-leftmousebutton drag (three finger drag) o Resize window: Alt-middle_button drag (three finger pinch) o Maximize/restore current window (to display size): Alt-F11 o Maximize/restore current window (to display height): Shift-F11 o Maximize/restore current window (to display width): Ctrl-F11 o Switch workspace .

… … … : Meta-Alt-[F1|F2|F3|F4] o Switch workspace taking active window: Meta-Ctrl-[F1|F2|F3|F4]

virtual bool handle_pointer_event(MirPointerEvent const *event) override

pointer event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

virtual bool handle_touch_event(MirTouchEvent const *event) override

touch event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

virtual bool handle_keyboard_event(MirKeyboardEvent const *event) override

keyboard event handler

Parameters:

event – the event

Returns:

whether the policy has consumed the event

track events that affect titlebar

virtual void advise_new_window(miral::WindowInfo const &window_info) override

Notification that a window has been created.

Parameters:

window_info – the window

virtual void handle_window_ready(miral::WindowInfo &window_info) override

notification that the first buffer has been posted

Parameters:

window_info – the window

virtual void advise_focus_gained(miral::WindowInfo const &info) override

Notification that a window has gained focus.

Parameters:

window_info – the window

virtual void handle_modify_window(miral::WindowInfo &window_info, miral::WindowSpecification const &modifications) override

request from client to modify the window specification.

Parameters:
  • window_info – the window

  • modifications – the requested changes

Note

the request has already been validated against the type definition

Public Functions

FloatingWindowManagerPolicy(miral::WindowManagerTools const &tools, std::shared_ptr<SplashSession> const &spinner, miral::InternalClientLauncher const &launcher, std::function<void()> &shutdown_hook)
~FloatingWindowManagerPolicy()
virtual miral::WindowSpecification place_new_window(miral::ApplicationInfo const &app_info, miral::WindowSpecification const &request_parameters) override

Customize initial window placement.

Parameters:
  • app_info – the application requesting a new window

  • requested_specification – the requested specification (updated with default placement)

Returns:

the customized specification