Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-03-02 07:36:37 -0500
committerAlexander Kurtakov2018-03-02 07:51:28 -0500
commited2e4fa0648abe16583fd105e408e48b9e0ad36b (patch)
tree8a2950acc89c8ae1e43ae01237322640fb760a2c
parent0aa46cfe2c773c9552f2f2a8c79e442cda905931 (diff)
downloadeclipse.platform.swt-ed2e4fa0648abe16583fd105e408e48b9e0ad36b.tar.gz
eclipse.platform.swt-ed2e4fa0648abe16583fd105e408e48b9e0ad36b.tar.xz
eclipse.platform.swt-ed2e4fa0648abe16583fd105e408e48b9e0ad36b.zip
Bug 479646 - GLib-CRITICAL output when adding MouseHover listener
GSource created with g_timeout_add is auto destroyed when the callback returns FALSE and our implementation always does that in order for the hover to be hidden. Change-Id: I0b3fa89de5c7ba2a813c54477166e0f5eb919bb8 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
index d8ac517669..f5dfa430fd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Display.java
@@ -4228,7 +4228,12 @@ Rectangle mapInPixels (Control from, Control to, int x, int y, int width, int he
long /*int*/ mouseHoverProc (long /*int*/ handle) {
Widget widget = getWidget (handle);
- if (widget == null) return 0;
+ // null the GSource id as our implementation always returns 0 so the hover is
+ // hidden and this leads to the GSource to be destroyed
+ mouseHoverId = 0;
+ if (widget == null) {
+ return 0;
+ }
return widget.hoverProc (handle);
}

Back to the top