Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 261764

Summary: embedded AWT - Can't receiving swt mousewheel event on Linux
Product: [Eclipse Project] Platform Reporter: clay <JingTao.Zhao>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: david.crecente, eclipse.felipe, ericwill, JingTao.Zhao, pwebster
Version: 3.4.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard: stalebug

Description clay CLA 2009-01-21 02:12:23 EST
Build ID: M20080911-1700

Steps To Reproduce:
1.download eclipse 3.41 sdk;
2.create a java project
3.add lib org.eclipse.set.gtk.linux.x86_3.4.1.v3449c.jar (path:eclipse/plusgins);
4.new a new class.
5.add a main function:
	public static void main(String[] args) {
		
		final Display display = new Display();
		final Shell shell = new Shell(display);
		shell.setText("Using Swing and AWT in Swt");

		shell.setSize(800, 600);
		shell.setLayout(new FillLayout());
		
		Composite composite = new Composite(shell,SWT.EMBEDDED | SWT.NO_BACKGROUND);
		composite.addMouseWheelListener(new MouseWheelListener(){

			@Override
			public void mouseScrolled(MouseEvent e) {
				System.out.println("hi,i am swt conposite,has been got scrolled event");
			}
			
		});
		java.awt.Frame frame = SWT_AWT.new_Frame(composite);


		// frame.getContentPane().add(new Swt_awtClock());
		java.awt.Panel panel = new java.awt.Panel();
		panel.addMouseWheelListener(new java.awt.event.MouseWheelListener(){
			@Override
			public void mouseWheelMoved(MouseWheelEvent e) {
				// TODO Auto-generated method stub
				System.out.println("hi,i am awt conposite,has been got scrolled event");
			}
		});
		frame.add(panel);
		java.awt.Panel panel1 = new java.awt.Panel();
		panel.add(panel1, BorderLayout.CENTER);
		Button button = new Button();
		button.setLabel("testtest");
		panel1.add(button);
		frame.repaint();
		frame.pack();
		composite.setFocus();
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}


More information:
Comment 1 clay CLA 2009-01-21 02:18:20 EST
I can't get a swt mousewheel event, only has a messge "hi,i am awt conposite,has been got scrolled event" while i scroll mousewheel.
Comment 2 clay CLA 2009-01-21 03:32:34 EST
java version "1.6.0_10"
Comment 3 Grant Gayed CLA 2010-02-02 11:00:56 EST
I see this on win32 as well.
Comment 4 Eric Williams CLA 2018-07-06 13:37:53 EDT
Still reproducible, SWT master/GTK3.22/Fedora 28.
Comment 5 Eclipse Genie CLA 2021-03-18 15:07:48 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.