How can I get the gtk window window id

I have an application where I need to display streaming video using XV.

I will pass the identifier of the top-level window to the main video playback application, which will attach / add a child window (a child window with streaming videos in it) to my window. Therefore, for this I need to get the identifier of the top-level window provided by the operating system.

I use GTK + and C on Linux.

+3
source share
1 answer

You use the macro GDK_DRAWABLE_XID () if you are on X11:

GtkWindow *mywindow;
GdkWindow *gwin;

gwin = gtk_widget_get_window(GTK_WIDGET(mywindow));
printf("the X11 id is %u\n", GDK_DRAWABLE_XID(gwin));
+5
source

Source: https://habr.com/ru/post/1725254/


All Articles