[PATCH weston v1 07/17] tests-helper: distil the functionality from handlers
Derek Foreman
derekf at osg.samsung.com
Wed Dec 10 08:01:13 PST 2014
On 10/12/14 06:08 AM, Marek Chalupa wrote:
>
>
> On 9 December 2014 at 21:36, Derek Foreman <derekf at osg.samsung.com
> <mailto:derekf at osg.samsung.com>> wrote:
>
> Distill has 2 ls...
>
> On 05/12/14 07:36 AM, Marek Chalupa wrote:
> > Split out the real code from event handlers (like pointer_handle_motion,
> > etc.) and put it into standalone function. We'll use it in follow-up
> > patch where we will register handlers for toytoolkit clients and we'll
> > use the new functions so that the code won't be duplicated.
> >
> > Signed-off-by: Marek Chalupa <mchqwerty at gmail.com <mailto:mchqwerty at gmail.com>>
> > ---
> > tests/weston-test-client-helper.c | 170 +++++++++++++++++++++++++++++---------
> > 1 file changed, 130 insertions(+), 40 deletions(-)
> >
> ...
>
> > +
> > +static void
> > +store_keyboard_modifiers(struct keyboard *keyboard, uint32_t mods_depressed,
> > + uint32_t mods_latched, uint32_t mods_locked,
> > + uint32_t group)
> > +{
> > keyboard->mods_depressed = mods_depressed;
> > keyboard->mods_latched = mods_latched;
> > keyboard->mods_locked = mods_locked;
> > keyboard->group = group;
> >
> > - fprintf(stderr, "test-client: got keyboard modifiers %u %u %u %u\n",
> > + fprintf(stderr, "test-client: got keyboard modifiers %x %x %x %x\n",
> > mods_depressed, mods_latched, mods_locked, group);
> > }
>
> I personally prefer 0x%x to %x on the off chance something comes up that
> could be decimal. It can be confusing.
>
> Is this change an important part of the patch?
>
>
> Not at all, I don't even remember I changed this :D I probably made it
> when I was debugging something.
> Nevermind.., I'll revert it back to %u. Or is 0x%x better?
Hmm, to me this makes more sense as 0x%x, since iirc modifiers are a
bitfield.
More information about the wayland-devel
mailing list