From 17bbbde74ae114c629f6ce573a667e60c613bb3e Mon Sep 17 00:00:00 2001 From: Owen Taylor Date: Fri, 6 Dec 2002 22:49:56 +0000 Subject: [PATCH] Use the correct screen for getting the height. (Fix from Stephen Browne, Fri Dec 6 17:46:42 2002 Owen Taylor * gtk/gtkmenu.c (gtk_menu_window_size_request): Use the correct screen for getting the height. (Fix from Stephen Browne, #96777) --- ChangeLog | 6 ++++++ ChangeLog.pre-2-10 | 6 ++++++ ChangeLog.pre-2-2 | 6 ++++++ ChangeLog.pre-2-4 | 6 ++++++ ChangeLog.pre-2-6 | 6 ++++++ ChangeLog.pre-2-8 | 6 ++++++ gtk/gtkmenu.c | 3 ++- 7 files changed, 38 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 9bd6cef549..9196946b00 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9bd6cef549..9196946b00 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index 9bd6cef549..9196946b00 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9bd6cef549..9196946b00 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9bd6cef549..9196946b00 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9bd6cef549..9196946b00 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +Fri Dec 6 17:46:42 2002 Owen Taylor + + * gtk/gtkmenu.c (gtk_menu_window_size_request): Use + the correct screen for getting the height. + (Fix from Stephen Browne, #96777) + Thu Dec 5 16:01:14 2002 Eric Warmenhoven * gdk/{linux-fb,win32}/Makefile.am: Fix gdkenumtypes.h hack diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index d7c06650c1..ee2f8a0e15 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -417,7 +417,8 @@ gtk_menu_window_size_request (GtkWidget *window, if (private->have_position) { - gint screen_height = gdk_screen_height (); + GdkScreen *screen = gtk_widget_get_screen (window); + gint screen_height = gdk_screen_get_height (screen); if (private->y + requisition->height > screen_height) requisition->height = screen_height - private->y;