From 1ff8f6eb22be390ab23706a31d67573957d3c4e0 Mon Sep 17 00:00:00 2001 From: Moritz Lipp Date: Thu, 9 Feb 2012 01:20:42 +0100 Subject: [PATCH] Use correct dimensions for sc_adjust_window --- shortcuts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shortcuts.c b/shortcuts.c index 7c0dcc1..de32e95 100644 --- a/shortcuts.c +++ b/shortcuts.c @@ -57,10 +57,10 @@ sc_adjust_window(girara_session_t* session, girara_argument_t* argument, } /* get window size */ - /* TODO: Get correct size of the view widget */ - gint width; - gint height; - gtk_window_get_size(GTK_WINDOW(session->gtk.window), &width, &height); + GtkAllocation allocation; + gtk_widget_get_allocation(session->gtk.view, &allocation); + gint width = allocation.width; + gint height = allocation.height; /* calculate total width and max-height */ double total_width = 0;