summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2006-09-07 20:27:59 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2006-09-07 20:27:59 +0000
commitc356081c88b1954eee29e972e9bfd62b3aad90d6 (patch)
tree0158835c9c6d7777a5986cafba913b9071268191 /gtk
parentb353c7cd36d776e4f14f8fbef1b6c108432b49e7 (diff)
downloadnetsurf-c356081c88b1954eee29e972e9bfd62b3aad90d6.tar.gz
netsurf-c356081c88b1954eee29e972e9bfd62b3aad90d6.tar.bz2
Fix GTK build
svn path=/trunk/netsurf/; revision=2927
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtk_window.c22
1 files 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)