[PATCH weston 1/3] eventdemo: do not print pointer frames alone

Pekka Paalanen ppaalanen at gmail.com
Fri May 13 11:37:38 UTC 2016


On Fri, 13 May 2016 11:03:07 +0200
Benoit Gschwind <gschwind at gnu-log.net> wrote:

> Hello Pekka,
> 
> as-is you get my:
> Reviewed-by: Benoit Gschwind <gschwind at gnu-log.net>
> Tested-by: Benoit Gschwind <gschwind at gnu-log.net>
> 
> But I have comments that may be worth to read :)
> 
> On 10/05/2016 16:11, Pekka Paalanen wrote:
> > From: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > Print pointer frames only if any pointer related events are printed
> > first.
> > 
> > This avoids flooding the output with "pointer frame" just because of
> > motion.  
> 
> I would use something like:
> 
> This avoids flooding the output with "pointer frame" of hidden/filtered
> events.
> 
> But it's more about taste.

Hi,

I added:
  You can test this with e.g.
      $ ./weston-eventdemo --log-button

> > 
> > Signed-off-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > ---
> >  clients/eventdemo.c | 26 ++++++++++++++++++++++++++
> >  1 file changed, 26 insertions(+)
> > 
> > diff --git a/clients/eventdemo.c b/clients/eventdemo.c
> > index e323aa5..f1558d2 100644
> > --- a/clients/eventdemo.c
> > +++ b/clients/eventdemo.c
> > @@ -35,6 +35,7 @@
> >  
> >  #include <stdio.h>
> >  #include <stdlib.h>
> > +#include <stdbool.h>
> >  
> >  #include <cairo.h>
> >  
> > @@ -93,6 +94,8 @@ struct eventdemo {
> >  	struct display *display;
> >  
> >  	int x, y, w, h;
> > +
> > +	bool print_pointer_frame;  
> 
> I would use a global static following the existing width, height, log_*
> rather than smear the eventdemo structure. That also reduce the patch size.

I hate both globals and statics used for no other reason than
lazyness, so I try to avoid them. They are always somewhat surprising.

Pushed all three:
   6bc5254..0baffb0  master -> master


Thanks,
pq
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 811 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160513/752bf616/attachment.sig>


More information about the wayland-devel mailing list