Make sure private->monitor_num is a valid monitor number before using it.

2004-07-06  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkmenu.c (gtk_menu_position): Make sure
	private->monitor_num is a valid monitor number before
	using it.  (#139187, Michael Natterer)

2004-06-25  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfontbutton.c (gtk_font_button_update_font_info): Avoid
	a crash if the font doesn't exist.  (#144967, Yevgen Muntyan)
This commit is contained in:
Matthias Clasen 2004-07-06 13:28:42 +00:00 committed by Matthias Clasen
parent ed4707d505
commit aa794a6646
5 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2004-07-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_position): Make sure
private->monitor_num is a valid monitor number before
using it. (#139187, Michael Natterer)
Tue Jul 6 02:00:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkfilechooserdefault.c (popup_position_func):

View File

@ -1,3 +1,9 @@
2004-07-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_position): Make sure
private->monitor_num is a valid monitor number before
using it. (#139187, Michael Natterer)
Tue Jul 6 02:00:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkfilechooserdefault.c (popup_position_func):

View File

@ -1,3 +1,9 @@
2004-07-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_position): Make sure
private->monitor_num is a valid monitor number before
using it. (#139187, Michael Natterer)
Tue Jul 6 02:00:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkfilechooserdefault.c (popup_position_func):

View File

@ -1,3 +1,9 @@
2004-07-06 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkmenu.c (gtk_menu_position): Make sure
private->monitor_num is a valid monitor number before
using it. (#139187, Michael Natterer)
Tue Jul 6 02:00:28 2004 Matthias Clasen <maclas@gmx.de>
* gtk/gtkfilechooserdefault.c (popup_position_func):

View File

@ -3311,6 +3311,9 @@ gtk_menu_position (GtkMenu *menu)
if (menu->position_func)
{
(* menu->position_func) (menu, &x, &y, &push_in, menu->position_func_data);
if (private->monitor_num < 0)
private->monitor_num = gdk_screen_get_monitor_at_point (screen, x, y);
gdk_screen_get_monitor_geometry (screen, private->monitor_num, &monitor);
}
else