More accurate helper to position popup menus
This commit is contained in:
parent
eb1e7c5cc1
commit
c9c02fe5df
|
@ -299,6 +299,7 @@ static void _panel_helper_position_menu(GtkMenu * menu, gint * x, gint * y,
|
||||||
{
|
{
|
||||||
Panel * panel = data;
|
Panel * panel = data;
|
||||||
GtkRequisition req;
|
GtkRequisition req;
|
||||||
|
gint height;
|
||||||
|
|
||||||
gtk_widget_size_request(GTK_WIDGET(menu), &req);
|
gtk_widget_size_request(GTK_WIDGET(menu), &req);
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -308,8 +309,8 @@ static void _panel_helper_position_menu(GtkMenu * menu, gint * x, gint * y,
|
||||||
if(req.height <= 0)
|
if(req.height <= 0)
|
||||||
return;
|
return;
|
||||||
*x = PANEL_BORDER_WIDTH;
|
*x = PANEL_BORDER_WIDTH;
|
||||||
*y = panel->root_height - (PANEL_BORDER_WIDTH * 8) - panel->icon_height
|
gtk_window_get_size(GTK_WINDOW(panel->window), NULL, &height);
|
||||||
- req.height;
|
*y = panel->root_height - height - req.height;
|
||||||
*push_in = TRUE;
|
*push_in = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user