GNOME Bugzilla – Bug 312497
MouseMotionEvent x and y coords always identical
Last modified: 2009-08-15 18:40:50 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:
Thanks for reporting this. Issue has been identified and a fix will be committed soon.
Fixed in HEAD, gtk-java-2-6 branch was not affected.