GdkX11.X11Window

g GObject.Object GObject.Object Gdk.Window Gdk.Window GObject.Object->Gdk.Window GdkX11.X11Window GdkX11.X11Window Gdk.Window->GdkX11.X11Window

Subclasses:None

Methods

Inherited:Gdk.Window (160), GObject.Object (37)
Structs:GObject.ObjectClass (5)
class foreign_new_for_display (display, window)
class lookup_for_display (display, window)
  get_desktop ()
  get_xid ()
  move_to_current_desktop ()
  move_to_desktop (desktop)
  set_frame_extents (left, right, top, bottom)
  set_frame_sync_enabled (frame_sync_enabled)
  set_hide_titlebar_when_maximized (hide_titlebar_when_maximized)
  set_theme_variant (variant)
  set_user_time (timestamp)
  set_utf8_property (name, value)

Virtual Methods

Inherited:Gdk.Window (3), GObject.Object (7)

Properties

Inherited:Gdk.Window (1)

Class Details

class GdkX11.X11Window(parent, attributes, attributes_mask)
Bases:Gdk.Window
Abstract:No
Structure:GdkX11.X11WindowClass
classmethod foreign_new_for_display(display, window)[source]
Parameters:
Returns:

a Gdk.Window wrapper for the native window, or None if the window has been destroyed. The wrapper will be newly created, if one doesn’t exist already.

Return type:

Gdk.Window

Wraps a native window in a Gdk.Window. The function will try to look up the window using GdkX11.X11Window.lookup_for_display() first. If it does not find it there, it will create a new window.

This may fail if the window has been destroyed. If the window was already known to GDK, a new reference to the existing Gdk.Window is returned.

New in version 2.24.

classmethod lookup_for_display(display, window)[source]
Parameters:
Returns:

the Gdk.Window wrapper for the native window, or None if there is none.

Return type:

GdkX11.X11Window

Looks up the Gdk.Window that wraps the given native window handle.

New in version 2.24.

get_desktop()[source]
Returns:the current workspace of self
Return type:int

Gets the number of the workspace self is on.

New in version 3.10.

get_xid()[source]
Returns:the ID of drawable’s X resource.
Return type:int

Returns the X resource (window) belonging to a Gdk.Window.

move_to_current_desktop()[source]

Moves the window 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 window is already on all workspaces.

New in version 2.8.

move_to_desktop(desktop)[source]
Parameters:desktop (int) – the number of the workspace to move the window to

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

New in version 3.10.

set_frame_extents(left, right, top, bottom)[source]
Parameters:
  • left (int) – The left extent
  • right (int) – The right extent
  • top (int) – The top extent
  • bottom (int) – The bottom extent

This is the same as Gdk.Window.set_shadow_width() but it only works on GdkX11.X11Window.

New in version 3.10.

Deprecated since version 3.12: Use Gdk.Window.set_shadow_width() instead.

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 window. Normally frame synchronziation will be enabled or disabled based on whether the system has a compositor that supports frame synchronization, but if the window is not directly managed by the window manager, then frame synchronziation may need to be disabled. This is the case for a window embedded via the XEMBED protocol.

New in version 3.8.

set_hide_titlebar_when_maximized(hide_titlebar_when_maximized)[source]
Parameters:hide_titlebar_when_maximized (bool) – whether to hide the titlebar when maximized

Set a hint for the window manager, requesting that the titlebar should be hidden when the window is maximized.

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 windows.

New in version 3.4.

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 windows.

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 windows.

New in version 3.2.

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 window. This property stores an Xserver time which represents the time of the last user input event received for this window. This property may be used by the window manager to alter the focus, stacking, and/or placement behavior of windows when they are mapped depending on whether the new window was created by a user action or is a “pop-up” window 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.

New in version 2.6.

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 window, it is ignored.

New in version 3.4.