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

Bug 369821

Summary: On Linux, cannot change cursor while mouse is held down
Product: [Eclipse Project] Platform Reporter: Nam Quang Tran <qforce>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: arunkumar.thondapu, eclipse.felipe, ericwill
Version: 3.7.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=498217
Whiteboard: stalebug
Attachments:
Description Flags
Test case none

Description Nam Quang Tran CLA 2012-01-26 11:13:32 EST
Build Identifier: 

I was trying to implement drag & drop support using mouse listeners. While the mouse moves over the possible drop targets, the mouse cursor should be updated to indicate which targets are valid and which aren't. This works fine on Windows. On Linux, however, trying to change the cursor with setCursor does nothing.

Reproducible: Always

Steps to Reproduce:
1. Launch snippet
2. Move mouse into yellow label component
3. Start dragging
4. If mouse is over label, cursor should be a 'disallowed' icon, otherwise a hand icon. This works on Windows, but not on Linux.
Comment 1 Nam Quang Tran CLA 2012-01-26 11:14:26 EST
Created attachment 210126 [details]
Test case
Comment 2 Felipe Heidrich CLA 2012-01-30 11:29:24 EST
Arun, please take a look.
Comment 3 Arun Thondapu CLA 2012-01-31 02:13:14 EST
Tested on Ubuntu Linux 11.04 and able to reproduce the problem, will try to fix it.
Comment 4 Arun Thondapu CLA 2012-02-15 08:32:09 EST
Felipe, I could see while debugging that the cursor is actually being changed as expected at the backend (shell.getCursor() returns the changed cursor) but this update is not being reflected in the UI while the MouseMove events are being processed. If the cursor is not reset on MouseUp, you can see the changed cursor appear over the shell after the MouseUp event is processed.

I have not been able to figure out the cause for this behavior.
I have confirmed that the GTK API gdk_window_set_cursor() followed by XFlush() is running without any errors in Control.setCursor(). I have also tried invoking gdk_window_process_all_updates() but it doesn't help. Do you have any ideas about how to proceed?
Comment 5 Eric Williams CLA 2018-05-14 14:29:33 EDT
Still reproducible: GTK3.22, 4.8 M7, and Fedora 28.
Comment 6 Eclipse Genie CLA 2020-07-22 12:38:00 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.