GdkX11.X11Window.foreign_new_for_display
function foreign_new_for_display(display: GdkX11.X11Display, window: xlib.Window): Gdk.Window { // Gjs wrapper for gdk_x11_window_foreign_new_for_display() }
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.
Since 2.24
- display
the Gdk.Display where the window handle comes from.
- window
an Xlib Window
- Returns
a Gdk.Window wrapper for the native window, or null if the window has been destroyed. The wrapper will be newly created, if one doesn’t exist already.