diff options
author | Kevin Barnes <krbarnes> | 2007-04-23 19:40:41 +0000 |
---|---|---|
committer | Kevin Barnes <krbarnes> | 2007-04-23 19:40:41 +0000 |
commit | 0da378dccc96f92d81657f22e07057a3681952d8 (patch) | |
tree | d6ef1bd62c20370f10d93f9e8c225cca561cc2af | |
parent | a30a576eacddc8c02946638028b162e4f3b08507 (diff) | |
download | eclipse.platform.swt-0da378dccc96f92d81657f22e07057a3681952d8.tar.gz eclipse.platform.swt-0da378dccc96f92d81657f22e07057a3681952d8.tar.xz eclipse.platform.swt-0da378dccc96f92d81657f22e07057a3681952d8.zip |
Bug 177374 - SEGV in libswt-pi-gtk-3330
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java index ccd92d9cd7..e0f995220b 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Menu.java @@ -572,7 +572,18 @@ int /*long*/ gtk_hide (int /*long*/ widget) { if ((style & SWT.POP_UP) != 0) { display.activeShell = getShell (); } - sendEvent (SWT.Hide); + if (OS.GTK_VERSION >= OS.VERSION (2, 6, 0)) { + sendEvent (SWT.Hide); + } else { + /* + * Bug in GTK. In GTK 2.4 and earlier + * a crash could occur if a menu item + * was disposed within gtk_hide. The + * workaroud is to post the event instead + * of send it on these platforms + */ + postEvent (SWT.Hide); + } return 0; } |