[PATCH] dix: IsFloating() on master devices is always false
Jon TURNEY
jon.turney at dronecode.org.uk
Mon Feb 20 04:06:53 PST 2012
On 20/02/2012 03:23, Peter Hutterer wrote:
> There are a few subtle bugs during startup where IsFloating() returns true
> if the device is a master device that is not yet paired with its keyboard
> device.
>
> Force IsFloating() to always return FALSE for master devices, that was the
> intent after all and any code that relies on the other behaviour should be
> fixed instead.
>
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
> Turned out the vesa test case was another occurence of this same issue, so I
> think that instaead of the previous two patches (revert + fix) it's better
> to just push this one instead. After all, there may be more lingering bugs
> here so we might as well squash all of them preventively.
>
> It's a bit more bigger than I'd like at this point in the release but given
> that this is how the API was intended it should have few repercussions.
>
> dix/events.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/dix/events.c b/dix/events.c
> index 3c7d5d0..96e3f9c 100644
> --- a/dix/events.c
> +++ b/dix/events.c
> @@ -343,7 +343,7 @@ IsMaster(DeviceIntPtr dev)
> Bool
> IsFloating(DeviceIntPtr dev)
> {
> - return GetMaster(dev, MASTER_KEYBOARD) == NULL;
> + return !IsMaster(dev) && GetMaster(dev, MASTER_KEYBOARD) == NULL;
> }
Tested-by: Jon TURNEY <jon.turney at dronecode.org.uk>
Thanks again.
More information about the xorg-devel
mailing list