Community
Participate
Working Groups
1) Run eclipse on GTK3 port (export SWT_GTK3=1) 2) Try to scroll vertically using the scroll wheel in an editor or tree view (package explorer) Nothing happens.
I thought this was happening because we did not support GDK_SCROLL_SMOOTH, but there is something else wrong. The editor is not getting the scroll event. There are cases when the events come fine, for example, after closing all perspectives and reopening only the java perspective, I can scroll wheel on the package explorer. Add GDK_SMOOTH_SCROLL support: http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=79b4c494683ecd3609c3ab417806e1f053ca5e78
The delta_x and delta_y fields where added only on GTK 3.4. We need to use the helper function gdk_event_get_scroll_deltas() in order to be able to compile in versions < 3.4. http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=92eda262fe6609e637257b664ef3791c831227e8
This happens after a call to setRedraw(false)/setRedraw(true). Simple snippet. Works until you click on the shell background. import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.*; import org.eclipse.swt.*; public class Test { public static void main(String[] args) { final Display display = new Display(); Shell shell = new Shell(display); shell.setLayout(new GridLayout(1, false)); final Composite composite = new Composite(shell, SWT.BORDER); composite.addListener(SWT.MouseWheel, new Listener() { public void handleEvent(Event event) { System.out.println("mouse wheel"); } }); shell.addListener(SWT.MouseDown, new Listener() { public void handleEvent(Event event) { System.out.println("fail"); composite.setRedraw(false); composite.setRedraw(true); } }); shell.setSize(300, 300); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
The event SCROLL_MASK was lost in this call OS.gdk_window_set_events (window, OS.gtk_widget_get_events (paintHandle ())); Fixed http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=2f1ae4577dc2ebb8f48083edff797d352d1b47ca