After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 312497 - MouseMotionEvent x and y coords always identical
MouseMotionEvent x and y coords always identical
Status: VERIFIED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other All
: Normal normal
: ---
Assigned To: Ismael Juma
Ismael Juma
Depends on:
Blocks:
 
 
Reported: 2005-08-03 19:36 UTC by Adam Jocksch
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12



Description Adam Jocksch 2005-08-03 19:36:06 UTC
Please describe the problem:
When MouseMotionEvents are recieved, the results of getX() and getY() are 
identical, no matter the position of the cursor on the widget. It looks like 
it's the x value that is being copied into both spots 
 
This test case illustrates the problem:  
-------------- 
import org.gnu.gtk.EventBox;  
import org.gnu.gtk.Gtk;  
import org.gnu.gtk.Window;  
import org.gnu.gtk.event.MouseMotionEvent;  
import org.gnu.gtk.event.MouseMotionListener;  
  
public class MouseMotionTestCase {  
  
	/**  
	 * @param args  
	 */  
	public static void main(String[] args) {  
		Gtk.init(args);  
		  
		Window w = new Window();  
		  
		EventBox e = new EventBox();  
		  
		e.addListener(new MouseMotionListener() {  
		  
			public boolean mouseMotionEvent(MouseMotionEvent event)  
{  
				System.out.println("event.getX() =="+  
                           "event.getY(): "+ (event.getX() == event.getY()));  
				  
				return false;  
			}  
		  
		});  
		  
		w.add(e);  
		w.showAll();  
		  
		Gtk.main();  
 	}  
  
}  

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Ismael Juma 2005-08-03 23:57:59 UTC
Thanks for reporting this. Issue has been identified and a fix will be committed
soon.
Comment 2 Ismael Juma 2005-08-04 16:01:11 UTC
Fixed in HEAD, gtk-java-2-6 branch was not affected.