diff options
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java index ca2e9be981..3484fef1b5 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/TrayItem.java @@ -329,7 +329,15 @@ int /*long*/ gtk_size_allocate (int /*long*/ widget, int /*long*/ allocation) { } int /*long*/ gtk_status_icon_popup_menu (int /*long*/ widget, int /*long*/ button, int /*long*/ activate_time) { + /* + * GTK provides a MenuPositionFunc for GtkStatusIcon in order + * to set the popup-menu aligned to the tray. + */ + Display display = this.display; + display.currentTrayItem = this; sendEvent (SWT.MenuDetect); + if (!isDisposed ()) display.runPopups(); + display.currentTrayItem = null; return 0; } |