Skip to content

Commit bdd0195

Browse files
committed
CTabFolder: combine mouse enter and mouse move cases
This seem to be logical continuation of the previous commit where we wanted to NOT set the tooltip to the null but to a proper value already on mouse enter. With the "mouse enter" was issued last, after "mouse exit", at same location and without any events following, it would also make sense to draw the same state as it would be on the last move. See #2017
1 parent 3225227 commit bdd0195

File tree

1 file changed

+4
-4
lines changed
  • bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom

1 file changed

+4
-4
lines changed

bundles/org.eclipse.swt/Eclipse SWT Custom Widgets/common/org/eclipse/swt/custom/CTabFolder.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1813,10 +1813,6 @@ void onMouse(Event event) {
18131813
}
18141814
int x = event.x, y = event.y;
18151815
switch (event.type) {
1816-
case SWT.MouseEnter: {
1817-
_setToolTipText(event.x, event.y);
1818-
break;
1819-
}
18201816
case SWT.MouseExit: {
18211817
for (int i=0; i<items.length; i++) {
18221818
CTabItem item = items[i];
@@ -1911,6 +1907,10 @@ public void run() {
19111907
}
19121908
break;
19131909
}
1910+
case SWT.MouseEnter: {
1911+
// fall through to the "move" case, see
1912+
// https://github.com/eclipse-platform/eclipse.platform.swt/issues/2017
1913+
}
19141914
case SWT.MouseMove: {
19151915
_setToolTipText(event.x, event.y);
19161916
boolean close = false;

0 commit comments

Comments
 (0)