Workspace QML Type (Singleton)

Import Statement: import org.kde.kwin

Note: This type is a QML singleton. There is only one instance of this type in the QML engine.

Properties

Signals

Methods

Detailed Description

Property Documentation

activeScreen : LogicalOutput

activeWindow : Window

activities : list<string>

currentActivity : string

currentDesktop : VirtualDesktop

cursorPos : point

The current position of the cursor.

desktopGridHeight : int

desktopGridSize : size

desktopGridWidth : int

desktops : list<VirtualDesktop>

screenOrder : list<LogicalOutput>

screens : list<LogicalOutput>

stackingOrder : list<Window>

List of Clients currently managed by KWin, ordered by their visibility (later ones cover earlier ones).

virtualDesktopNavigationWrapsAround : bool [since 6.7]

Whether navigation in the desktop layout wraps around at the borders

This property was introduced in 6.7.

virtualScreenGeometry : rect

The bounding geometry of all screens combined. Always starts at (0,0) and has virtualScreenSize as it's size.

See also virtualScreenSize.

virtualScreenSize : size

The bounding size of all screens combined. Overlapping areas are not counted multiple times.

See also virtualScreenGeometry.

workspaceHeight : int

workspaceSize : size

workspaceWidth : int

Signal Documentation

activitiesChanged(string id)

Signal emitted whenever the list of activities changed.

id id of the new activity

Note: The corresponding handler is onActivitiesChanged.

activityAdded(string id)

This signal is emitted when a new activity is added

id id of the new activity

Note: The corresponding handler is onActivityAdded.

activityRemoved(string id)

This signal is emitted when the activity is removed

id id of the removed activity

Note: The corresponding handler is onActivityRemoved.

currentActivityChanged(string id)

Signal emitted whenever the current activity changed.

id id of the new activity

Note: The corresponding handler is onCurrentActivityChanged.

desktopLayoutChanged()

Signal emitted whenever the layout of virtual desktops changed.

That is desktopGrid(Size/Width/Height) will have new values.

Note: The corresponding handler is onDesktopLayoutChanged.

desktopsChanged()

This signal is emitted when a virtual desktop is added or removed.

Note: The corresponding handler is onDesktopsChanged.

screenOrderChanged()

Emitted when the output order list changes, e.g. the primary output changes.

Note: The corresponding handler is onScreenOrderChanged.

screensChanged()

Emitted when the output list changes, e.g. an output is connected or removed.

Note: The corresponding handler is onScreensChanged.

virtualScreenGeometryChanged()

Emitted whenever the virtualScreenGeometry changes.

Note: The corresponding handler is onVirtualScreenGeometryChanged.

See also virtualScreenGeometry().

virtualScreenSizeChanged()

Emitted whenever the virtualScreenSize changes.

Note: The corresponding handler is onVirtualScreenSizeChanged.

See also virtualScreenSize().

windowActivated(Window window)

Note: The corresponding handler is onWindowActivated.

windowAdded(Window window)

Note: The corresponding handler is onWindowAdded.

windowRemoved(Window window)

Note: The corresponding handler is onWindowRemoved.

Method Documentation

rect clientArea(enumeration option, Window client)

Overloaded method for convenience.

client The Client for which the area should be retrieved

void clientArea(int position, string name)

Create a new virtual desktop at the requested position.

position The position of the desktop. It should be in range [0, count].

name The name for the new desktop, if empty the default name will be used.

rect clientArea(enumeration option, LogicalOutput output, VirtualDesktop desktop)

Returns the geometry a Client can use with the specified option.

This method should be preferred over other methods providing screen sizes as the various options take constraints such as struts set on panels into account. This method is also multi screen aware, but there are also options to get full areas.

option The type of area which should be considered

screen The screen for which the area should be considered

desktop The desktop for which the area should be considered, in general there should not be a difference

[since 6.5] void constrain(Window below, Window above)

Defines that a window needs to remain under another

below the window that will be underneath

above the window that will be over

This method was introduced in 6.5.

VirtualDesktop currentDesktopForScreen(LogicalOutput output)

Returns current desktop on screen given by output.

See also setCurrentDesktopForScreen().

Window getClient(int windowId)

Returns the Client with the given windowId.

[since 6.0] bool isEffectActive(string pluginId)

Checks if a specific effect is currently active.

pluginId The plugin Id of the effect to check.

Returns true if the effect is loaded and currently active, false otherwise.

This method was introduced in 6.0.

void moveDesktop(VirtualDesktop desktop, int position)

Moves the desktop to the specified position.

void raiseWindow(Window window)

Raises a Window above all others on the screen.

window The Window to raise

void removeDesktop(VirtualDesktop desktop)

Removes the specified virtual desktop.

Tile rootTile(LogicalOutput output, VirtualDesktop desktop)

Returns the root tile for the given @a output and @a desktop.

LogicalOutput screenAt(point pos)

void setCurrentDesktopForScreen(VirtualDesktop desktop, LogicalOutput output)

Sets current desktop on output.

See also currentDesktopForScreen().

string supportInformation()

Provides support information about the currently running KWin instance.

[since 6.5] Window unconstrain(Window below, Window above)

Breaks the constraint where a window is to remain under another

below the window that was set to be underneath

above the window that was set to be over

This method was introduced in 6.5.

list<Window> windowAt(point pos, int count = 1)

Finds up to count windows at a particular location, prioritizing the topmost one first. A negative count returns all matching clients.

pos The location to look for

count The number of clients to return

Returns a list of Client objects