Class ApplicationSwitcher

Class Documentation

class ApplicationSwitcher

A simple application switcher.

This class spawns an internal wayland client. Shells can bind the methods defined in this class to custom keybinds. For example, a shell may bind alt + tab to trigger ApplicationSwitcher::next_app.

Instances of this class should be provided to miral::StartupInternalClient.

Users must call ApplicationSwitcher::stop in the stop callback of their server to stop the switcher.

This internal client relies on the following protocols:

  1. wlr foreign toplevel management v1

  2. wlr layer shell v1

Remark

Since MirAL 5.6

Warning

This is implementation is a work in progress. As such, it may be lacking features that are expected from a typical application switcher client. Use at your own risk.

Public Functions

ApplicationSwitcher()

Creates a new application switcher.

~ApplicationSwitcher()
void operator()(wl_display *display)
void operator()(std::weak_ptr<mir::scene::Session> const &session) const
void next_app() const

Tentatively select the next application in the focus list.

The application will not be focused until confirm is called.

void prev_app() const

Tentatively select the previous application in the focus list.

The application will not be focused until confirm is called.

void confirm() const

Focus the tentatively selected application and hide it.

void cancel() const

Cancel application switching.

void stop() const

Stop the application switcher altogether.