Bug 295268 - Slider doesn't receive MouseMove events when dragged
Summary: Slider doesn't receive MouseMove events when dragged
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 11:39 EST by Jussi Suistomaa CLA
Modified: 2019-09-06 16:16 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jussi Suistomaa CLA 2009-11-16 11:39:26 EST
Here's a snippet to reproduce. You should be able to see how MouseMove events are received when hovering the mouse above the Slider. But when the left mouse button is held down and the slider is dragged no MouseMove events are received by the listener. 

public class SliderTest {

static int nMouseMoves;
	
public static void main(String[] args) {
    Display display = new Display();
    Shell shell = new Shell();
    shell.setLayout(new FillLayout(SWT.VERTICAL));
    Slider slider = new Slider(shell, SWT.HORIZONTAL);
    final Label label = new Label(shell, SWT.LEFT);
    final String description = 
        "Number of SWT.MouseMove events receved in Slider="; 
    label.setText(description + nMouseMoves + "                 ");
    slider.addListener(SWT.MouseMove, new Listener() {
        public void handleEvent(Event event) {
        label.setText(description + (++nMouseMoves));
    }});
    shell.pack();
    shell.open();
    while(!shell.isDisposed()) {
        if(!display.readAndDispatch())
            display.sleep();
        }
    display.dispose();
    }
}
Comment 1 Felipe Heidrich CLA 2009-11-16 12:26:42 EST
Why do you need the mouse move events for ? Are you stuck trying to implement something ?
Comment 2 Jussi Suistomaa CLA 2009-11-17 03:55:40 EST
(In reply to comment #1)

I'm not stuck. Just noticed it doesn't work like the documentation indicates and thought I'd report it so it can be fixed.
Comment 3 Eclipse Webmaster CLA 2019-09-06 16:16:43 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.

If you have further information on the current state of the bug, please add it. 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.