Skip to content
Snippets Groups Projects
Commit a84b82ed authored by Olivier Fourdan's avatar Olivier Fourdan
Browse files

Set monitor when positionning menu (Bug #4162)

(Old svn revision: 27225)
parent 6f88a38a
No related branches found
No related tags found
No related merge requests found
......@@ -97,6 +97,8 @@ popup_position_func (GtkMenu * menu, gint * x, gint * y, gboolean * push_in,
{
GtkRequisition req;
GdkPoint *pos;
gint monitor;
GdkScreen *screen;
pos = user_data;
......@@ -120,6 +122,11 @@ popup_position_func (GtkMenu * menu, gint * x, gint * y, gboolean * push_in,
{
*y = (gdk_screen_height () - req.height) / 2;
}
screen = gtk_widget_get_screen (GTK_WIDGET(menu));
monitor = find_monitor_at_point (screen, *x, *y);
gtk_menu_set_monitor (GTK_MENU (menu), monitor);
g_free (user_data);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment