get_active_window


Description:

[ Version ( deprecated = true , deprecated_since = "3.22" , since = "2.10" ) ]
public Window? get_active_window ()

Warning: get_active_window is deprecated since 3.22.

Returns the screen’s currently active window.

On X11, this is done by inspecting the _NET_ACTIVE_WINDOW property on the root window, as described in the Extended Window Manager Hints. If there is no currently currently active window, or the window manager does not support the _NET_ACTIVE_WINDOW hint, this function returns null.

On other platforms, this function may return null, depending on whether it is implementable on that platform.

The returned window should be unrefed using unref when no longer needed.

Parameters:

this

a Screen

Returns:

the currently active window, or null.