Re: [PULL] hw/xwin fixes + a warning fix
On 27/01/2012 04:22, Keith Packard wrote: On Fri, 27 Jan 2012 10:28:40 +1000, Peter Hutterer wrote: Jon confirmed on IRC that just removing miSetPointerPosition() fixes it anyways, so let's do that. Makes a lot more sense to me anyways... Thanks for spotting this. I have amended that patch as suggested by Peter and re-pushed my branch. ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
On Fri, 27 Jan 2012 12:02:21 +, Jon TURNEY jon.tur...@dronecode.org.uk wrote: I have amended that patch as suggested by Peter and re-pushed my branch. Merged. 02775ef..8e78bbb master - master -- keith.pack...@intel.com pgpPbFA5fEqZt.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
On Thu, 26 Jan 2012 16:13:59 +, Jon TURNEY jon.tur...@dronecode.org.uk wrote: hw/xwin: Fix winEnqueueMotion() for change in miPointerSetPosition() This looks like it's missing x = dx; y = dy; Without that, you'll miss any changes to position made by miPointerSetPosition. -- keith.pack...@intel.com pgpdFsR4wwTfe.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
Hi, This looks like it's missing x = dx; y = dy; With this in I get no mouse events (on the left monitor) when the main display is not leftmost with multiple monitors. The casting is probably messing up negative x's on Windows? As in the [PULL] I can't detect any position errors. Thanks, Colin ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
On Thu, 26 Jan 2012 19:27:42 -, Colin Harrison colin.harri...@virgin.net wrote: This looks like it's missing x = dx; y = dy; With this in I get no mouse events (on the left monitor) when the main display is not leftmost with multiple monitors. I don't understand how that can happen -- miSetPointerPosition isn't supposed to change the position unless the pointer is constrained. The casting is probably messing up negative x's on Windows? As in the [PULL] I can't detect any position errors. You won't be clipping mouse positions, which makes this change significantly different from the commit message (as it now discards information that it used to use). Perhaps Peter has some idea of what's going on here... -- keith.pack...@intel.com pgpBArAgk3lDl.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
Hi, Looking into it further the code at the end of miPointerSetPosition() maybe the cause of this... /* In the event we actually change screen or we get confined, we just * drop the float component on the floor * FIXME: only drop remainder for ConstrainCursorHarder, not for screen * crossings */ if (x != trunc(*screenx)) *screenx = x; if (y != trunc(*screeny)) *screeny = y; this was introduced at the same time the function switched to doubles. If I revert those traps and then call the function... void winEnqueueMotion(int x, int y) { int valuators[2]; ValuatorMask mask; double dx = (double)x; double dy = (double)y; miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, dx, dy); x = trunc(dx); y = trunc(dy); valuators[0] = x; valuators[1] = y; valuator_mask_set_range(mask, 0, 2, valuators); QueuePointerEvents(g_pwinPointer, MotionNotify, 0, POINTER_ABSOLUTE | POINTER_SCREEN, mask); } I now get no problem...I could however do better by just using doubles for x and y in the hw/xwin function headers and get rid of those hacky casts and trunc()'s. Will now test that + use of POINTER_RELATIVE looks dodgy! Thanks, Colin ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
Hi, On 27 January 2012 10:22, Colin Harrison colin.harri...@virgin.net wrote: If I revert those traps and then call the function... void winEnqueueMotion(int x, int y) { int valuators[2]; ValuatorMask mask; double dx = (double)x; double dy = (double)y; miPointerSetPosition(g_pwinPointer, POINTER_RELATIVE, dx, dy); x = trunc(dx); y = trunc(dy); valuators[0] = x; valuators[1] = y; valuator_mask_set_range(mask, 0, 2, valuators); QueuePointerEvents(g_pwinPointer, MotionNotify, 0, POINTER_ABSOLUTE | POINTER_SCREEN, mask); } I now get no problem...I could however do better by just using doubles for x and y in the hw/xwin function headers and get rid of those hacky casts and trunc()'s. Will now test that + use of POINTER_RELATIVE looks dodgy! Why are you actually calling miPointerSetPosition at all? QueuePointerEvents (- GetPointerEvents - positionSprite, both in dix/getevents.c) already do that for you. You can also avoid the need for the valuators[] array by just calling valuator_mask_set(mask, 0, x); valuator_mask_set(mask, 1, y); at which point your function gets very short indeed. Cheers, Daniel ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
Hi, Daniel wrote: Why are you actually calling miPointerSetPosition at all? Someone had to be daft enough to use it. As in if it isn't defined static then it must be useful And if it is then I want to access it anyway :) It's late...more coffee is required to wash away the dust! Thanks, Colin ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
On Thu, Jan 26, 2012 at 01:10:53PM -0800, Keith Packard wrote: On Thu, 26 Jan 2012 19:27:42 -, Colin Harrison colin.harri...@virgin.net wrote: This looks like it's missing x = dx; y = dy; With this in I get no mouse events (on the left monitor) when the main display is not leftmost with multiple monitors. I don't understand how that can happen -- miSetPointerPosition isn't supposed to change the position unless the pointer is constrained. The casting is probably messing up negative x's on Windows? As in the [PULL] I can't detect any position errors. You won't be clipping mouse positions, which makes this change significantly different from the commit message (as it now discards information that it used to use). Perhaps Peter has some idea of what's going on here... quick peek only but just removing the miSetPointerPosition() call altogether seems like the right thing to do. Not sure why the other one doesn't move the pointer but rough guess: with the newfangled coord scaling using the clipped valuators in QueuePointerEvents may actually cancel out the miPointerSetPosition() effect. That's really just a guess though. Jon confirmed on IRC that just removing miSetPointerPosition() fixes it anyways, so let's do that. Cheers, Peter ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
Re: [PULL] hw/xwin fixes + a warning fix
On Fri, 27 Jan 2012 10:28:40 +1000, Peter Hutterer peter.hutte...@who-t.net wrote: Jon confirmed on IRC that just removing miSetPointerPosition() fixes it anyways, so let's do that. Makes a lot more sense to me anyways... -- keith.pack...@intel.com pgpX9OtWdnRR5.pgp Description: PGP signature ___ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel