From c356081c88b1954eee29e972e9bfd62b3aad90d6 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Thu, 7 Sep 2006 20:27:59 +0000 Subject: [PATCH] Fix GTK build svn path=/trunk/netsurf/; revision=2927 --- gtk/gtk_window.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/gtk/gtk_window.c b/gtk/gtk_window.c index 3ff76095c..2adb2e1a0 100644 --- a/gtk/gtk_window.c +++ b/gtk/gtk_window.c @@ -965,16 +965,6 @@ void gui_window_set_scroll(struct gui_window *g, int sx, int sy) } -int gui_window_get_width(struct gui_window* g) -{ - return GTK_WIDGET(g->drawing_area)->allocation.width; -} - -int gui_window_get_height(struct gui_window* g) -{ - return GTK_WIDGET(g->drawing_area)->allocation.height; -} - void gui_window_update_extent(struct gui_window *g) { if (!g->bw->current_content) @@ -1197,10 +1187,16 @@ bool gui_copy_to_clipboard(struct selection *s) } -void gui_window_get_dimensions(struct gui_window *g, int *width, int *height) +void gui_window_get_dimensions(struct gui_window *g, int *width, int *height, + bool scaled) { - *width = 1; - *height = 1; + *width = GTK_WIDGET(g->drawing_area)->allocation.width; + *height = GTK_WIDGET(g->drawing_area)->allocation.height; + + if (scaled) { + *width /= g->scale; + *height /= g->scale; + } } void gui_window_position_frame(struct gui_window *g, int x0, int y0, int x1, int y1)