How to get window xid in Vala using Gdk.X11.Window?

632 views Asked by At

I am using GStreamer in my program, and I need to get window xid to use it. I have working solution now, but it's deprecated (I am using Gdk.X11Window now). How can I do the same but using Gdk.X11.Window so it won't be deprecated?

Here is what I'm doing now, it's working but, according to the compiler it's deprecated.

this.drawingArea.realize.connect(() => {
    this.xid = (uint*)Gdk.X11Window.get_xid(this.drawingArea.get_window());
});

(drawingArea is Gdk.DrawingArea)

1

There are 1 answers

0
nemequ On BEST ANSWER

((Gdk.X11.Window) this.drawing_area.get_window()).get_xid ();