aboutsummaryrefslogtreecommitdiff
path: root/src/libui_sdl/libui/unix/window.c
diff options
context:
space:
mode:
authorStapleButter <thetotalworm@gmail.com>2017-09-19 17:38:43 +0200
committerStapleButter <thetotalworm@gmail.com>2017-09-19 17:38:43 +0200
commitdefe46e37edeedf04697034190548dbc2af56202 (patch)
tree8b36b8e7478500f39b15f342c597942055a8240a /src/libui_sdl/libui/unix/window.c
parentedd33187b630d705b9915b7cf34fb76307db4d1e (diff)
GTK: apply window client size to childHolderWidget. fixes sizing when a menubar is present.
Diffstat (limited to 'src/libui_sdl/libui/unix/window.c')
-rw-r--r--src/libui_sdl/libui/unix/window.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libui_sdl/libui/unix/window.c b/src/libui_sdl/libui/unix/window.c
index 43287a9..3507de9 100644
--- a/src/libui_sdl/libui/unix/window.c
+++ b/src/libui_sdl/libui/unix/window.c
@@ -262,6 +262,9 @@ uiWindow *uiNewWindow(const char *title, int width, int height, int hasMenubar)
gtk_widget_set_valign(w->childHolderWidget, GTK_ALIGN_FILL);
gtk_box_set_homogeneous(GTK_BOX(w->childHolderWidget), TRUE);
gtk_container_add(w->vboxContainer, w->childHolderWidget);
+
+ // set client size proper
+ gtk_widget_set_size_request(w->childHolderWidget, width, height);
// show everything in the vbox, but not the GtkWindow itself
gtk_widget_show_all(w->vboxWidget);