Staging View tooltips: work around bug 330384 on GTK
commit1bf3ccac3b17a9dabf8b228526ee774094dc2d3e
authorThomas Wolf <thomas.wolf@paranor.ch>
Wed, 14 Jun 2017 11:41:31 +0000 (14 13:41 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 17 Jun 2017 20:51:26 +0000 (17 22:51 +0200)
tree4ffa808e3b74e1b74bc0771343fb9cf4c284118d
parent57b59f3387579bfab7fabeaddbdebe0d5126e0fa
Staging View tooltips: work around bug 330384 on GTK

On GTK at least, the artificial inset of 5 pixels used in the
tooltip's internal TooltipHideListener closes the tooltip before
the mouse ever can move over the tooltip. It appears that on GTK
the tooltip's shell gets an SWT.MouseExit event with coordinates
inside the tooltip, but not within the smaller inset area.

It's utterly unclear to me why this inset was ever programmed anyway.
Removing it and always testing against the true bounds of the tooltip
resolves the problem and makes it possible to move the mouse cursor
over the tooltip, also on GTK.

The behavior on MacOS is unchanged.

Bug: 516969
Change-Id: I009be811e0fee9483ed7a0827b5dfe15c4d4490f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/FixedJFaceToolTip.java [new file with mode: 0644]
org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/staging/StagingViewTooltips.java