Bug 229227

Summary: [GTK] resize broken for wrapped X11 windows
Product: WebKit Reporter: lucianito
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: NEW    
Severity: Normal CC: bugs-noreply
Priority: P2    
Version: WebKit Local Build   
Hardware: PC   
OS: Linux   

lucianito
Reported 2021-08-17 22:56:43 PDT
Adding a web view to a GtkWindow created by wrapping a native X11 window works but then the web view does not respond to window size changes. Window child = XCreateWindow(display, parent, 0, 0, initial_width, initial_height, 0, CopyFromParent, CopyFromParent, CopyFromParent, 0, 0); GdkWindow* gdkChild = gdk_x11_window_foreign_new_for_display(gdk_display_get_default(), child); GtkWindow* window = GTK_WINDOW(gtk_widget_new(GTK_TYPE_WINDOW, NULL)); g_signal_connect(window, "realize", G_CALLBACK(gtk_widget_set_window), gdkChild); WebKitWebView* webview = WEBKIT_WEB_VIEW(webkit_web_view_new()); gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(webView)); ... web view displays and works as expected .... gtk_window_resize(window, some_width, some_height); // web view content dimensions are never resized
Attachments
Note You need to log in before you can comment on or make changes to this bug.