Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 479580 - Widgets with V_SCROLL not scrollable
Summary: Widgets with V_SCROLL not scrollable
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.5   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 4.6 M3   Edit
Assignee: Alexander Kurtakov CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 489874 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-10-12 12:02 EDT by Alexander Kurtakov CLA
Modified: 2016-04-02 08:18 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kurtakov CLA 2015-10-12 12:02:02 EDT
When creating a widget with V_SCROLL and later hide it's scrollbar it is no longer scrollable with mouse wheel. Original bug coming from Pydev non scrollable when scrollbar hidden on linux (but works fine otherwise) https://bugzilla.redhat.com/show_bug.cgi?id=1198217 .
Snippet to reproduce:
package org.eclipse.swt.snippets;
 
import org.eclipse.swt.*;
import org.eclipse.swt.custom.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.widgets.*;

public class Snippet {

public static void main (String [] args) {
	Display display = new Display ();
	Shell shell = new Shell (display);
	StyledText text = new StyledText (shell, SWT.BORDER | SWT.V_SCROLL);
	text.getVerticalBar().setVisible(false);
	Rectangle clientArea = shell.getClientArea ();
	text.setBounds (clientArea.x + 10, clientArea.y + 10, 100, 100);
	for (int i=0; i<16; i++) {
		text.append ("Line " + i + "\n");
	}
	shell.open ();
	text.setSelection (30);
	while (!shell.isDisposed ()) {
		if (!display.readAndDispatch ()) display.sleep ();
	}
	display.dispose ();
}
}
Comment 1 Eclipse Genie CLA 2015-10-12 12:09:14 EDT
New Gerrit change created: https://git.eclipse.org/r/58013
Comment 3 Alexander Kurtakov CLA 2015-10-12 12:16:54 EDT
Fix pushed to master.
Comment 4 Eclipse Genie CLA 2015-10-21 11:01:05 EDT
New Gerrit change created: https://git.eclipse.org/r/58632
Comment 6 Arun Thondapu CLA 2015-10-23 03:26:54 EDT
(In reply to Eclipse Genie from comment #5)
> Gerrit change https://git.eclipse.org/r/58632 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=8b6ee95646cc2004411d0ad0cb144b724a9b6331

This has started causing a couple of test failures [1] on linux - Test_org_eclipse_swt_widgets_ScrollBar.test_setVisibleZ and Test_org_eclipse_swt_widgets_ScrollBar.test_isVisible

[1] http://download.eclipse.org/eclipse/downloads/drops4/N20151022-2000/testresults/html/org.eclipse.swt.tests_linux.gtk.x86_64_8.0.html
Comment 7 Eclipse Genie CLA 2015-10-23 04:10:16 EDT
New Gerrit change created: https://git.eclipse.org/r/58785
Comment 9 Alexander Kurtakov CLA 2015-10-23 04:17:23 EDT
(In reply to Arun Thondapu from comment #6)
> (In reply to Eclipse Genie from comment #5)
> > Gerrit change https://git.eclipse.org/r/58632 was merged to [master].
> > Commit:
> > http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> > ?id=8b6ee95646cc2004411d0ad0cb144b724a9b6331
> 
> This has started causing a couple of test failures [1] on linux -
> Test_org_eclipse_swt_widgets_ScrollBar.test_setVisibleZ and
> Test_org_eclipse_swt_widgets_ScrollBar.test_isVisible
> 
> [1]
> http://download.eclipse.org/eclipse/downloads/drops4/N20151022-2000/
> testresults/html/org.eclipse.swt.tests_linux.gtk.x86_64_8.0.html


Newer version that works for me on both GTK2 and GTK3 pushed. Sorry I simply forgot to test GTK3 with the previous one.
Comment 10 Alexander Kurtakov CLA 2015-10-23 04:17:37 EDT
Doh, forgot to test GTK2 actually.
Comment 11 Sravan Kumar Lakkimsetti CLA 2015-10-27 07:36:28 EDT
Verified in I20151026-2000 on GTK2 x86 platform
Comment 12 Fabio Zadrozny CLA 2016-04-02 08:18:18 EDT
*** Bug 489874 has been marked as a duplicate of this bug. ***