Community
Participate
Working Groups
Created attachment 255939 [details] Incorrect Sash postion Dragging Sash with SWT.SMOOTH | SWT.VERTICAL style causes incorrect Sash bounds if attempt to drag Sash outside of valid area is performed (i.e., to a position when left or right widgets width can become less than minimum allowed value). Only vertical Sash on GTK is affected. To reproduce, try to drag Sash in Eclipse Preferences dialog sharply to left/right several times (so the minimum width of left panel with preferences tree is reached), than release mouse button. As the result there is no Sash between left and right panels anymore and you cannot drag it again (resizing dialog workarounds the issue). Also, please, see attached screenshot of our custom dialog as another example of this issue. It seems bug at org.eclipse.swt.widgets.Sash.gtk_motion_notify_event method. In the end of this method you can see following code: if ((style & SWT.SMOOTH) != 0) { setBounds (event.x, lastY, width, height); // widget could be disposed at this point } In this code event.x should be changed to lastX (see the simular method for Windows platform org.eclipse.swt.widgets.Sash.WM_MOUSEMOVE, where the X coordidate of Sash bounds sets correctly to lastX).
Would you please attach a snippet to test the code and even submit gerrit patch for fixing the issue?
Created attachment 256857 [details] Simple snippet to reproduce the issue
Created attachment 256858 [details] Screenshot with the issue reproduced by the attached snippet
Snippet and corresponding screenshot are attached. There is nothing special with this snippet, it is simple SashForm with two Text widgets inside. I have only colored the background of the Sash widget via reflection for better understanding of the problem. To reproduce: 1. Run the snippet. 2. Quickly move sash to the left and right. Note during these movements you should move mouse outside of the left and right window borders to reproduce the issue.
This has been fixed in M7. *** This bug has been marked as a duplicate of bug 522140 ***