GdkX11.X11Surface

g GObject.Object GObject.Object Gdk.Surface Gdk.Surface GObject.Object->Gdk.Surface GdkX11.X11Surface GdkX11.X11Surface Gdk.Surface->GdkX11.X11Surface

Subclasses:

None

Methods

Inherited:

Gdk.Surface (27), GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

lookup_for_display (display, window)

get_desktop ()

get_group ()

get_xid ()

move_to_current_desktop ()

move_to_desktop (desktop)

set_frame_sync_enabled (frame_sync_enabled)

set_group (leader)

set_skip_pager_hint (skips_pager)

set_skip_taskbar_hint (skips_taskbar)

set_theme_variant (variant)

set_urgency_hint (urgent)

set_user_time (timestamp)

set_utf8_property (name, value)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Inherited:

Gdk.Surface (8)

Signals

Inherited:

Gdk.Surface (5), GObject.Object (1)

Fields

Inherited:

Gdk.Surface (5), GObject.Object (1)

Class Details

class GdkX11.X11Surface(**kwargs)
Bases:

Gdk.Surface

Abstract:

No

Structure:

GdkX11.X11SurfaceClass

classmethod lookup_for_display(display, window)[source]
Parameters:
  • display (GdkX11.X11Display) – the GdkDisplay corresponding to the window handle

  • window (int) – an Xlib Window

Returns:

the GdkSurface wrapper for the native window

Return type:

GdkX11.X11Surface

Looks up the GdkSurface that wraps the given native window handle.

get_desktop()[source]
Returns:

the current workspace of self

Return type:

int

Gets the number of the workspace self is on.

get_group()[source]
Returns:

The group of this surface;

Return type:

Gdk.Surface or None

Returns the group this surface belongs to.

get_xid()[source]
Returns:

the ID of drawable’s X resource.

Return type:

int

Returns the X resource (surface) belonging to a GdkSurface.

move_to_current_desktop()[source]

Moves the surface to the correct workspace when running under a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints specification. Will not do anything if the surface is already on all workspaces.

move_to_desktop(desktop)[source]
Parameters:

desktop (int) – the number of the workspace to move the surface to

Moves the surface to the given workspace when running unde a window manager that supports multiple workspaces, as described in the Extended Window Manager Hints specification.

set_frame_sync_enabled(frame_sync_enabled)[source]
Parameters:

frame_sync_enabled (bool) – whether frame-synchronization should be enabled

This function can be used to disable frame synchronization for a surface. Normally frame synchronziation will be enabled or disabled based on whether the system has a compositor that supports frame synchronization, but if the surface is not directly managed by the window manager, then frame synchronziation may need to be disabled. This is the case for a surface embedded via the XEMBED protocol.

set_group(leader)[source]
Parameters:

leader (Gdk.Surface) – a GdkSurface

Sets the group leader of self to be leader. See the ICCCM for details.

set_skip_pager_hint(skips_pager)[source]
Parameters:

skips_pager (bool) – True to skip pagers

Sets a hint on self that pagers should not display it. See the EWMH for details.

set_skip_taskbar_hint(skips_taskbar)[source]
Parameters:

skips_taskbar (bool) – True to skip taskbars

Sets a hint on self that taskbars should not display it. See the EWMH for details.

set_theme_variant(variant)[source]
Parameters:

variant (str) – the theme variant to export

GTK applications can request a dark theme variant. In order to make other applications - namely window managers using GTK for themeing - aware of this choice, GTK uses this function to export the requested theme variant as _GTK_THEME_VARIANT property on toplevel surfaces.

Note that this property is automatically updated by GTK, so this function should only be used by applications which do not use GTK to create toplevel surfaces.

set_urgency_hint(urgent)[source]
Parameters:

urgent (bool) – True to indicate urgenct attention needed

Sets a hint on self that it needs user attention. See the ICCCM for details.

set_user_time(timestamp)[source]
Parameters:

timestamp (int) – An XServer timestamp to which the property should be set

The application can use this call to update the _NET_WM_USER_TIME property on a toplevel surface. This property stores an Xserver time which represents the time of the last user input event received for this surface. This property may be used by the window manager to alter the focus, stacking, and/or placement behavior of surfaces when they are mapped depending on whether the new surface was created by a user action or is a “pop-up” surface activated by a timer or some other event.

Note that this property is automatically updated by GDK, so this function should only be used by applications which handle input events bypassing GDK.

set_utf8_property(name, value)[source]
Parameters:
  • name (str) – Property name, will be interned as an X atom

  • value (str or None) – Property value, or None to delete

This function modifies or removes an arbitrary X11 window property of type UTF8_STRING. If the given self is not a toplevel surface, it is ignored.