win32: Hack to make statusbar menus show up visible:
This commit is contained in:
@ -136,6 +136,7 @@ struct _GtkStatusIconPrivate
|
|||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
GtkWidget *dummy_widget;
|
GtkWidget *dummy_widget;
|
||||||
NOTIFYICONDATAW nid;
|
NOTIFYICONDATAW nid;
|
||||||
|
gint taskbar_top;
|
||||||
gint last_click_x, last_click_y;
|
gint last_click_x, last_click_y;
|
||||||
GtkOrientation orientation;
|
GtkOrientation orientation;
|
||||||
gchar *tooltip_text;
|
gchar *tooltip_text;
|
||||||
@ -919,6 +920,8 @@ gtk_status_icon_init (GtkStatusIcon *status_icon)
|
|||||||
priv->orientation = GTK_ORIENTATION_VERTICAL;
|
priv->orientation = GTK_ORIENTATION_VERTICAL;
|
||||||
else
|
else
|
||||||
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
priv->orientation = GTK_ORIENTATION_HORIZONTAL;
|
||||||
|
|
||||||
|
priv->taskbar_top = abd.rc.top;
|
||||||
}
|
}
|
||||||
|
|
||||||
priv->last_click_x = priv->last_click_y = 0;
|
priv->last_click_x = priv->last_click_y = 0;
|
||||||
@ -2513,6 +2516,7 @@ gtk_status_icon_position_menu (GtkMenu *menu,
|
|||||||
#ifdef GDK_WINDOWING_WIN32
|
#ifdef GDK_WINDOWING_WIN32
|
||||||
GtkStatusIcon *status_icon;
|
GtkStatusIcon *status_icon;
|
||||||
GtkStatusIconPrivate *priv;
|
GtkStatusIconPrivate *priv;
|
||||||
|
GtkRequisition menu_req;
|
||||||
|
|
||||||
g_return_if_fail (GTK_IS_MENU (menu));
|
g_return_if_fail (GTK_IS_MENU (menu));
|
||||||
g_return_if_fail (GTK_IS_STATUS_ICON (user_data));
|
g_return_if_fail (GTK_IS_STATUS_ICON (user_data));
|
||||||
@ -2520,8 +2524,11 @@ gtk_status_icon_position_menu (GtkMenu *menu,
|
|||||||
status_icon = GTK_STATUS_ICON (user_data);
|
status_icon = GTK_STATUS_ICON (user_data);
|
||||||
priv = status_icon->priv;
|
priv = status_icon->priv;
|
||||||
|
|
||||||
|
gtk_widget_size_request (GTK_WIDGET (menu), &menu_req);
|
||||||
|
|
||||||
*x = priv->last_click_x;
|
*x = priv->last_click_x;
|
||||||
*y = priv->last_click_y;
|
*y = priv->taskbar_top - menu_req.height;
|
||||||
|
|
||||||
*push_in = TRUE;
|
*push_in = TRUE;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user