[PATCH 10/20] Switch to use IsFloating()

Peter Hutterer peter.hutterer at who-t.net
Tue Feb 22 14:31:32 PST 2011


On Tue, Feb 22, 2011 at 08:17:32AM +0100, Benjamin Tissoires wrote:
> Hi Peter,
> 
> Except two unnecessary parenthesis here, you can add my Reviewed-by
> for the series ;)
> 
> On 02/18/2011 04:52 AM, Peter Hutterer wrote:

[...]

> >diff --git a/Xi/xipassivegrab.c b/Xi/xipassivegrab.c
> >index e99b6e5..8663d12 100644
> >--- a/Xi/xipassivegrab.c
> >+++ b/Xi/xipassivegrab.c
> >@@ -162,10 +162,7 @@ ProcXIPassiveGrabDevice(ClientPtr client)
> >      if (!modifiers_failed)
> >          return BadAlloc;
> >
> >-    if (!IsMaster(dev)&&  dev->u.master)
> >-        mod_dev = GetMaster(dev, MASTER_KEYBOARD);
> >-    else
> >-        mod_dev = dev;
> >+    mod_dev = (IsFloating(dev)) ? dev : GetMaster(dev, MASTER_KEYBOARD);
> 
> parenthesis around IsFloating are not necessary... It's just to say
> something

fwiw, this is just one of my personal preferences. i like doing this for
terneray conditions as it helps me parse the code faster.

thanks for the reviews!

Cheers,
  Peter



More information about the xorg-devel mailing list