Re: [PATCH libinput 5/6] touchpad: change palm detection trigger functions to bools

2016-07-19 Thread Peter Hutterer
On Tue, Jul 19, 2016 at 10:46:27AM +0100, Eric Engestrom wrote:
> On Tue, Jul 19, 2016 at 10:49:28AM +1000, Peter Hutterer wrote:
> > And rename to make it more obvious what the return value means.
> > 
> > Signed-off-by: Peter Hutterer 
> > ---
> >  src/evdev-mt-touchpad.c | 28 +++-
> >  1 file changed, 15 insertions(+), 13 deletions(-)
> > 
> > diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> > index 7ee86a9..190448b 100644
> > --- a/src/evdev-mt-touchpad.c
> > +++ b/src/evdev-mt-touchpad.c
> > @@ -573,15 +573,17 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, 
> > const struct tp_touch *t)
> > return false;
> >  }
> >  
> > -static int
> > -tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t 
> > time)
> > +static bool
> > +tp_palm_detect_dwt_triggered(struct tp_dispatch *tp,
> > +struct tp_touch *t,
> > +uint64_t time)
> >  {
> > if (tp->dwt.dwt_enabled &&
> > tp->dwt.keyboard_active &&
> > t->state == TOUCH_BEGIN) {
> > t->palm.state = PALM_TYPING;
> > t->palm.first = t->point;
> > -   return 1;
> > +   return true;
> > } else if (!tp->dwt.keyboard_active &&
> >t->state == TOUCH_UPDATE &&
> >t->palm.state == PALM_TYPING) {
> > @@ -599,22 +601,22 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct 
> > tp_touch *t, uint64_t time)
> > }
> > }
> >  
> > -   return 0;
> > +   return false;
> >  }
> >  
> > -static int
> > -tp_palm_detect_trackpoint(struct tp_dispatch *tp,
> > - struct tp_touch *t,
> > - uint64_t time)
> > +static bool
> > +tp_palm_detect_trackpoint_triggered(struct tp_dispatch *tp,
> > +   struct tp_touch *t,
> > +   uint64_t time)
> >  {
> > if (!tp->palm.monitor_trackpoint)
> > -   return 0;
> > +   return false;
> >  
> > if (t->palm.state == PALM_NONE &&
> > t->state == TOUCH_BEGIN &&
> > tp->palm.trackpoint_active) {
> > t->palm.state = PALM_TRACKPOINT;
> > -   return 1;
> > +   return true;
> > } else if (t->palm.state == PALM_TRACKPOINT &&
> >t->state == TOUCH_UPDATE &&
> >!tp->palm.trackpoint_active) {
> > @@ -627,7 +629,7 @@ tp_palm_detect_trackpoint(struct tp_dispatch *tp,
> > }
> > }
> >  
> > -   return 0;
> > +   return false;
> >  }
> >  
> >  static inline bool
> > @@ -684,10 +686,10 @@ static void
> >  tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
> >  {
> >  
> > -   if (tp_palm_detect_dwt(tp, t, time))
> > +   if (tp_palm_detect_dwt_triggered(tp, t, time))
> > goto out;
> >  
> > -   if (tp_palm_detect_trackpoint(tp, t, time))
> > +   if (tp_palm_detect_trackpoint_triggered(tp, t, time))
> > goto out;
> >  
> > if (t->palm.state == PALM_EDGE) {
> > -- 
> > 2.7.4
> 
> I feel like the "detect" + "triggered" combo is a bit confusing, and
> `tp_palm_dwt_triggered()` & `tp_palm_trackpoint_triggered()` might be
> better names.

fwiw, the reason it's palm_detect_foo because it's part of the palm
detection. there is one other function tp_palm_tap_is_palm() that only uses
the palm prefix because at this point we already think it's a palm and we're
just continuing from there. That's why I prefer to leave the full prefix
here.

> Either way this whole series is welcome, and is
> Reviewed-by: Eric Engestrom 
> 
> BTW I was reading an article a few days ago about what a mess the
> success-like return values are in the C world. Maybe you read it too? ^^

heh, no, sorry. it was actually triggered by the safe_atoi discussion we had
on wayland-devel and then spawned the appropriate trainwreck of thought.
thanks for the review, much appreciated.

Cheers,
   Peter
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput 0/6] Return value cleanup

2016-07-19 Thread Peter Hutterer
On Tue, Jul 19, 2016 at 01:05:08PM -0700, Yong Bakos wrote:
> Hi Peter,
> 
> > On Jul 18, 2016, at 5:49 PM, Peter Hutterer  
> > wrote:
> > 
> > 
> > Return values are a bit messy, we randomly use bool and int. Functions
> > returning int sometimes return 0 or 1, sometimes 0 and -1, etc. This set
> > cleans up a bit, mostly by switching a bunch of functions to just be void
> > and the rest to actual bool true/false returns (with renames where needed
> > for obviousness)
> 
> Other than the trailing return in 2/6, looks good to me. I would explicitly
> add the includes for stdbool, but that's at your discretion.

they're already included in evdev.h and evdev-mt-touchpad.h - we need them
for the declarations. IMO we don't need to explicitly include them in the
source files then (this would be a cleanup for those files where we do so
already).
 
> > No functional changes, should be an easy review for a rainy day.
> 
> Or to procrastinate other work...
> 
> With my comments above in mind, this is
> 
> Reviewed-by: Yong Bakos 

thanks, much appreciated

Cheers,
   Peter
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput 2/6] Change a few functions that only ever returned 0 to voids

2016-07-19 Thread Peter Hutterer
On Tue, Jul 19, 2016 at 12:49:21PM -0700, Yong Bakos wrote:
> Hi Peter,
> I'm curious about the explicit return at the end of tp_process_button,
> inline below...
> 
> 
> > On Jul 18, 2016, at 5:49 PM, Peter Hutterer  
> > wrote:
> > 
> > These are internal functions, if we need them to return an error code we can
> > change that at any time. Meanwhile, if we only ever return 0 anyway we might
> > as well just make them voids to save on error paths.
> > 
> > Signed-off-by: Peter Hutterer 
> > ---
> > src/evdev-mt-touchpad-buttons.c | 14 +++
> > src/evdev-mt-touchpad-edge-scroll.c |  4 +-
> > src/evdev-mt-touchpad-gestures.c|  3 +-
> > src/evdev-mt-touchpad-tap.c |  4 +-
> > src/evdev-mt-touchpad.c | 77 
> > -
> > src/evdev-mt-touchpad.h | 12 +++---
> > src/evdev-tablet.c  |  5 +--
> > src/evdev.c | 34 ++--
> > src/evdev.h |  4 +-
> > 9 files changed, 53 insertions(+), 104 deletions(-)
> > 
> > diff --git a/src/evdev-mt-touchpad-buttons.c 
> > b/src/evdev-mt-touchpad-buttons.c
> > index 85a355f..ba0a016 100644
> > --- a/src/evdev-mt-touchpad-buttons.c
> > +++ b/src/evdev-mt-touchpad-buttons.c
> > @@ -452,7 +452,7 @@ tp_button_handle_event(struct tp_dispatch *tp,
> >   button_state_to_str(t->button.state));
> > }
> > 
> > -int
> > +void
> > tp_button_handle_state(struct tp_dispatch *tp, uint64_t time)
> > {
> > struct tp_touch *t;
> > @@ -488,8 +488,6 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t 
> > time)
> > if (tp->queued & TOUCHPAD_EVENT_BUTTON_PRESS)
> > tp_button_handle_event(tp, t, BUTTON_EVENT_PRESS, time);
> > }
> > -
> > -   return 0;
> > }
> > 
> > static void
> > @@ -500,7 +498,7 @@ tp_button_handle_timeout(uint64_t now, void *data)
> > tp_button_handle_event(t->tp, t, BUTTON_EVENT_TIMEOUT, now);
> > }
> > 
> > -int
> > +void
> > tp_process_button(struct tp_dispatch *tp,
> >   const struct input_event *e,
> >   uint64_t time)
> > @@ -513,7 +511,7 @@ tp_process_button(struct tp_dispatch *tp,
> > log_bug_kernel(libinput,
> >"received %s button event on a clickpad\n",
> >libevdev_event_code_get_name(EV_KEY, e->code));
> > -   return 0;
> > +   return;
> > }
> > 
> > if (e->value) {
> > @@ -524,7 +522,7 @@ tp_process_button(struct tp_dispatch *tp,
> > tp->queued |= TOUCHPAD_EVENT_BUTTON_RELEASE;
> > }
> > 
> > -   return 0;
> > +   return;
> > }
> 
> Why the explicit return here?

no reason, just an oversight, I've removed it locally. Thanks.

Cheers,
   Peter

> > 
> > void
> > @@ -831,7 +829,7 @@ tp_init_middlebutton_emulation(struct tp_dispatch *tp,
> > want_config_option);
> > }
> > 
> > -int
> > +void
> > tp_init_buttons(struct tp_dispatch *tp,
> > struct evdev_device *device)
> > {
> > @@ -884,8 +882,6 @@ tp_init_buttons(struct tp_dispatch *tp,
> > tp_libinput_context(tp),
> > tp_button_handle_timeout, t);
> > }
> > -
> > -   return 0;
> > }
> > 
> > void
> > diff --git a/src/evdev-mt-touchpad-edge-scroll.c 
> > b/src/evdev-mt-touchpad-edge-scroll.c
> > index 610744a..22cb5ae 100644
> > --- a/src/evdev-mt-touchpad-edge-scroll.c
> > +++ b/src/evdev-mt-touchpad-edge-scroll.c
> > @@ -281,7 +281,7 @@ tp_edge_scroll_handle_timeout(uint64_t now, void *data)
> > tp_edge_scroll_handle_event(t->tp, t, SCROLL_EVENT_TIMEOUT);
> > }
> > 
> > -int
> > +void
> > tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device)
> > {
> > struct tp_touch *t;
> > @@ -316,8 +316,6 @@ tp_edge_scroll_init(struct tp_dispatch *tp, struct 
> > evdev_device *device)
> > tp_libinput_context(tp),
> > tp_edge_scroll_handle_timeout, t);
> > }
> > -
> > -   return 0;
> > }
> > 
> > void
> > diff --git a/src/evdev-mt-touchpad-gestures.c 
> > b/src/evdev-mt-touchpad-gestures.c
> > index a910bec..acfc875 100644
> > --- a/src/evdev-mt-touchpad-gestures.c
> > +++ b/src/evdev-mt-touchpad-gestures.c
> > @@ -621,7 +621,7 @@ tp_gesture_handle_state(struct tp_dispatch *tp, 
> > uint64_t time)
> > }
> > }
> > 
> > -int
> > +void
> > tp_init_gesture(struct tp_dispatch *tp)
> > {
> > /* two-finger scrolling is always enabled, this flag just
> > @@ -634,7 +634,6 @@ tp_init_gesture(struct tp_dispatch *tp)
> > libinput_timer_init(>gesture.finger_count_switch_timer,
> > tp_libinput_context(tp),
> > tp_gesture_finger_count_switch_timeout, tp);
> > -   return 0;
> > }
> > 
> > void
> > diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c
> > index 232cd6a..c2b331c 

Re: Weston on framebuffer?

2016-07-19 Thread The Rasterman
On Tue, 19 Jul 2016 18:10:16 +0200 Christer Weinigel 
said:

> Hi,
> 
> I'm trying to port Linux to a Samsung S3C2416 based system (actually an
> oscilloscope, http://blog.weinigel.se/2016/05/01/sds7102-hacking.html).
> 
> The S3C2416 is a 400MHz ARM9 with a fairly dumb framebuffer, it has some
> 2D acceleration (pixel/line drawing with alpha, copy rectangle with
> alpha and/or color key) but as far as I can tell nobody has added Linux
> support for it.
> 
> I'm going to need some kind of GUI for the box and somebody mentioned
> that Weston has framebuffer support nowdays.  I turned on the Weston
> config option in buildroot (2015.5) and managed to get something that
> didn't work to begin with, the OS abstraction stuff requires support for
> posix_fadvise but for some reason that didn't work with ulibc but I
> hacked around that.  libinput didn't like eudev and didn't want to
> recognize a USB keyboard and USB mouse to begin with but I just
> hardcoded the device type instead of relying on udev to tag the devices.
> 
> With this I managed to get a desktop and was unable to start
> wayland-terminal.  Redrawing of the graphics felt fairly snappy, but the
> lag from pressing a key on the keyboard until a character showed up in
> the terminal was slow, probably between a quarter to half a second.
> 
> So my question is if this is the performance I should expect with weston
> on a 400MHz ARM9 and a dumb framebuffer?  Have I done something stupid
> and there are easy ways to speed it up?
> 
> Is there any documentation on how to convert the framebuffer driver for
> the S3C2416 to a KMS driver and how to add acceleration support?  Can
> weston use this?
> 
> Or is wayland/weston not really suited for this kind of old hardware and
> what should I use in that case?
> 
>   /Christer

when you say redraw is snappy... that implies that output is fast. so time from
deciding to render and update and it appearing is very short. but you seem to
have serious input lag which implies to me that it has nothing to do with your
cpu speed and is something else deeper and more involved. time to trace things
and see how they go.

-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput 0/6] Return value cleanup

2016-07-19 Thread Yong Bakos
Hi Peter,

> On Jul 18, 2016, at 5:49 PM, Peter Hutterer  wrote:
> 
> 
> Return values are a bit messy, we randomly use bool and int. Functions
> returning int sometimes return 0 or 1, sometimes 0 and -1, etc. This set
> cleans up a bit, mostly by switching a bunch of functions to just be void
> and the rest to actual bool true/false returns (with renames where needed
> for obviousness)

Other than the trailing return in 2/6, looks good to me. I would explicitly
add the includes for stdbool, but that's at your discretion.


> No functional changes, should be an easy review for a rainy day.

Or to procrastinate other work...

With my comments above in mind, this is

Reviewed-by: Yong Bakos 

yong


> Cheers,
>  Peter
> ___
> wayland-devel mailing list
> wayland-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH libinput 2/6] Change a few functions that only ever returned 0 to voids

2016-07-19 Thread Yong Bakos
Hi Peter,
I'm curious about the explicit return at the end of tp_process_button,
inline below...


> On Jul 18, 2016, at 5:49 PM, Peter Hutterer  wrote:
> 
> These are internal functions, if we need them to return an error code we can
> change that at any time. Meanwhile, if we only ever return 0 anyway we might
> as well just make them voids to save on error paths.
> 
> Signed-off-by: Peter Hutterer 
> ---
> src/evdev-mt-touchpad-buttons.c | 14 +++
> src/evdev-mt-touchpad-edge-scroll.c |  4 +-
> src/evdev-mt-touchpad-gestures.c|  3 +-
> src/evdev-mt-touchpad-tap.c |  4 +-
> src/evdev-mt-touchpad.c | 77 -
> src/evdev-mt-touchpad.h | 12 +++---
> src/evdev-tablet.c  |  5 +--
> src/evdev.c | 34 ++--
> src/evdev.h |  4 +-
> 9 files changed, 53 insertions(+), 104 deletions(-)
> 
> diff --git a/src/evdev-mt-touchpad-buttons.c b/src/evdev-mt-touchpad-buttons.c
> index 85a355f..ba0a016 100644
> --- a/src/evdev-mt-touchpad-buttons.c
> +++ b/src/evdev-mt-touchpad-buttons.c
> @@ -452,7 +452,7 @@ tp_button_handle_event(struct tp_dispatch *tp,
> button_state_to_str(t->button.state));
> }
> 
> -int
> +void
> tp_button_handle_state(struct tp_dispatch *tp, uint64_t time)
> {
>   struct tp_touch *t;
> @@ -488,8 +488,6 @@ tp_button_handle_state(struct tp_dispatch *tp, uint64_t 
> time)
>   if (tp->queued & TOUCHPAD_EVENT_BUTTON_PRESS)
>   tp_button_handle_event(tp, t, BUTTON_EVENT_PRESS, time);
>   }
> -
> - return 0;
> }
> 
> static void
> @@ -500,7 +498,7 @@ tp_button_handle_timeout(uint64_t now, void *data)
>   tp_button_handle_event(t->tp, t, BUTTON_EVENT_TIMEOUT, now);
> }
> 
> -int
> +void
> tp_process_button(struct tp_dispatch *tp,
> const struct input_event *e,
> uint64_t time)
> @@ -513,7 +511,7 @@ tp_process_button(struct tp_dispatch *tp,
>   log_bug_kernel(libinput,
>  "received %s button event on a clickpad\n",
>  libevdev_event_code_get_name(EV_KEY, e->code));
> - return 0;
> + return;
>   }
> 
>   if (e->value) {
> @@ -524,7 +522,7 @@ tp_process_button(struct tp_dispatch *tp,
>   tp->queued |= TOUCHPAD_EVENT_BUTTON_RELEASE;
>   }
> 
> - return 0;
> + return;
> }

Why the explicit return here?

yong


> 
> void
> @@ -831,7 +829,7 @@ tp_init_middlebutton_emulation(struct tp_dispatch *tp,
>   want_config_option);
> }
> 
> -int
> +void
> tp_init_buttons(struct tp_dispatch *tp,
>   struct evdev_device *device)
> {
> @@ -884,8 +882,6 @@ tp_init_buttons(struct tp_dispatch *tp,
>   tp_libinput_context(tp),
>   tp_button_handle_timeout, t);
>   }
> -
> - return 0;
> }
> 
> void
> diff --git a/src/evdev-mt-touchpad-edge-scroll.c 
> b/src/evdev-mt-touchpad-edge-scroll.c
> index 610744a..22cb5ae 100644
> --- a/src/evdev-mt-touchpad-edge-scroll.c
> +++ b/src/evdev-mt-touchpad-edge-scroll.c
> @@ -281,7 +281,7 @@ tp_edge_scroll_handle_timeout(uint64_t now, void *data)
>   tp_edge_scroll_handle_event(t->tp, t, SCROLL_EVENT_TIMEOUT);
> }
> 
> -int
> +void
> tp_edge_scroll_init(struct tp_dispatch *tp, struct evdev_device *device)
> {
>   struct tp_touch *t;
> @@ -316,8 +316,6 @@ tp_edge_scroll_init(struct tp_dispatch *tp, struct 
> evdev_device *device)
>   tp_libinput_context(tp),
>   tp_edge_scroll_handle_timeout, t);
>   }
> -
> - return 0;
> }
> 
> void
> diff --git a/src/evdev-mt-touchpad-gestures.c 
> b/src/evdev-mt-touchpad-gestures.c
> index a910bec..acfc875 100644
> --- a/src/evdev-mt-touchpad-gestures.c
> +++ b/src/evdev-mt-touchpad-gestures.c
> @@ -621,7 +621,7 @@ tp_gesture_handle_state(struct tp_dispatch *tp, uint64_t 
> time)
>   }
> }
> 
> -int
> +void
> tp_init_gesture(struct tp_dispatch *tp)
> {
>   /* two-finger scrolling is always enabled, this flag just
> @@ -634,7 +634,6 @@ tp_init_gesture(struct tp_dispatch *tp)
>   libinput_timer_init(>gesture.finger_count_switch_timer,
>   tp_libinput_context(tp),
>   tp_gesture_finger_count_switch_timeout, tp);
> - return 0;
> }
> 
> void
> diff --git a/src/evdev-mt-touchpad-tap.c b/src/evdev-mt-touchpad-tap.c
> index 232cd6a..c2b331c 100644
> --- a/src/evdev-mt-touchpad-tap.c
> +++ b/src/evdev-mt-touchpad-tap.c
> @@ -1010,7 +1010,7 @@ tp_tap_config_get_default_draglock_enabled(struct 
> libinput_device *device)
>   return tp_drag_lock_default(evdev);
> }
> 
> -int
> +void
> tp_init_tap(struct tp_dispatch *tp)
> {
>   tp->tap.config.count = tp_tap_config_count;
> @@ -1033,8 +1033,6 

Re: [PATCHv2 weston] include stdint.h for int32_t/uint32_t

2016-07-19 Thread Yong Bakos
On Jul 19, 2016, at 4:16 AM, Jussi Kukkonen  wrote:
> 
> Signed-off-by: Jussi Kukkonen 

Thanks Jussi, seems like you caught them all.

Reviewed-by: Yong Bakos 

yong


> ---
> clients/editor.c| 1 +
> clients/eventdemo.c | 1 +
> clients/ivi-shell-user-interface.c  | 1 +
> clients/keyboard.c  | 1 +
> clients/multi-resource.c| 1 +
> clients/nested-client.c | 1 +
> clients/presentation-shm.c  | 1 +
> clients/scaler.c| 1 +
> clients/simple-damage.c | 1 +
> clients/simple-dmabuf-intel.c   | 1 +
> clients/simple-dmabuf-v4l.c | 1 +
> clients/simple-egl.c| 1 +
> clients/simple-shm.c| 1 +
> clients/simple-touch.c  | 1 +
> clients/stacking.c  | 1 +
> clients/weston-info.c   | 1 +
> clients/weston-simple-im.c  | 1 +
> clients/window.h| 1 +
> compositor/cms-colord.c | 1 +
> compositor/cms-helper.c | 1 +
> compositor/main.c   | 1 +
> compositor/screen-share.c   | 1 +
> compositor/text-backend.c   | 1 +
> compositor/weston-screenshooter.c   | 1 +
> desktop-shell/exposay.c | 1 +
> desktop-shell/input-panel.c | 1 +
> desktop-shell/shell.c   | 1 +
> desktop-shell/shell.h   | 1 +
> fullscreen-shell/fullscreen-shell.c | 1 +
> ivi-shell/hmi-controller.c  | 1 +
> ivi-shell/input-panel-ivi.c | 1 +
> ivi-shell/ivi-layout-export.h   | 2 ++
> ivi-shell/ivi-layout-private.h  | 2 ++
> ivi-shell/ivi-layout-transition.c   | 1 +
> ivi-shell/ivi-layout.c  | 1 +
> ivi-shell/ivi-shell.c   | 1 +
> ivi-shell/ivi-shell.h   | 1 +
> libweston/animation.c   | 1 +
> libweston/bindings.c| 1 +
> libweston/clipboard.c   | 1 +
> libweston/compositor-drm.c  | 1 +
> libweston/compositor-fbdev.c| 1 +
> libweston/compositor-fbdev.h| 2 ++
> libweston/compositor-headless.c | 1 +
> libweston/compositor-headless.h | 2 ++
> libweston/compositor-rdp.c  | 1 +
> libweston/compositor-wayland.c  | 1 +
> libweston/compositor-wayland.h  | 2 ++
> libweston/compositor-x11.c  | 1 +
> libweston/compositor-x11.h  | 2 ++
> libweston/compositor.h  | 1 +
> libweston/data-device.c | 1 +
> libweston/dbus.c| 1 +
> libweston/gl-renderer.c | 1 +
> libweston/gl-renderer.h | 2 ++
> libweston/launcher-logind.c | 1 +
> libweston/launcher-util.c   | 1 +
> libweston/launcher-weston-launch.c  | 1 +
> libweston/libbacklight.c| 1 +
> libweston/libinput-device.c | 1 +
> libweston/libinput-seat.c   | 1 +
> libweston/linux-dmabuf.c| 1 +
> libweston/noop-renderer.c   | 1 +
> libweston/pixman-renderer.c | 1 +
> libweston/screenshooter.c   | 1 +
> libweston/spring-tool.c | 2 ++
> libweston/zoom.c| 1 +
> shared/config-parser.c  | 1 +
> shared/config-parser.h  | 2 ++
> shared/frame.c  | 1 +
> shared/image-loader.c   | 1 +
> shared/xalloc.c | 1 +
> shared/xalloc.h | 1 +
> tests/buffer-count-test.c   | 1 +
> tests/internal-screenshot-test.c| 1 +
> tests/ivi_layout-internal-test.c| 1 +
> tests/ivi_layout-test-plugin.c  | 1 +
> tests/ivi_layout-test.c | 1 +
> tests/keyboard-test.c   | 2 ++
> tests/presentation-test.c   | 1 +
> tests/surface-global-test.c | 1 +
> tests/surface-screenshot.c  | 1 +
> tests/text-test.c   | 1 +
> tests/weston-test-client-helper.c   | 1 +
> tests/weston-test-client-helper.h   | 1 +
> tests/weston-test.c | 1 +
> wcap/wcap-decode.h  | 2 ++
> xwayland/dnd.c  | 1 +
> xwayland/hash.h | 2 ++
> xwayland/launcher.c | 1 +
> xwayland/selection.c| 1 +
> xwayland/window-manager.c   | 1 +
> 92 files changed, 104 insertions(+)
> 
> diff --git a/clients/editor.c b/clients/editor.c
> index e081a5b..b34ef42 100644
> --- a/clients/editor.c
> +++ b/clients/editor.c
> @@ -25,6 +25,7 @@
> #include "config.h"
> 
> #include 
> +#include 
> #include 
> #include 
> #include 
> diff --git a/clients/eventdemo.c b/clients/eventdemo.c
> index f04e39b..d8eef5b 100644
> --- a/clients/eventdemo.c
> +++ b/clients/eventdemo.c
> @@ -33,6 +33,7 @@
> 
> #include "config.h"
> 
> +#include 
> #include 
> #include 
> #include 
> diff --git a/clients/ivi-shell-user-interface.c 
> b/clients/ivi-shell-user-interface.c
> index 06b79a2..6ae4f7c 100644
> --- 

Re: [PATCH wayland] (multiple): Include stdint.h

2016-07-19 Thread Yong Bakos
On Jul 19, 2016, at 2:21 AM, Eric Engestrom  wrote:
> 
> On Mon, Jul 18, 2016 at 12:42:25PM -0500, Yong Bakos wrote:
>> From: Yong Bakos 
>> 
>> Some headers and source files have been using types such as uint32_t
>> without explicitly including stdint.h.
>> 
>> Explicitly include stdint.h where appropriate.
>> 
>> Signed-off-by: Yong Bakos 
> 
> Matches my grep.
> Reviewed-by: Eric Engestrom 

Thanks Eric. Note that one exception is wayland-util.h, which includes
inttypes.h (no need to include stdint.h).

yong


>> ---
>> cursor/cursor-data.h  | 2 ++
>> cursor/wayland-cursor.c   | 1 +
>> src/event-loop.c  | 1 +
>> src/scanner.c | 1 +
>> src/wayland-client-core.h | 1 +
>> src/wayland-private.h | 1 +
>> src/wayland-server.h  | 1 +
>> src/wayland-shm.c | 1 +
>> tests/connection-test.c   | 1 +
>> tests/display-test.c  | 1 +
>> tests/event-loop-test.c   | 1 +
>> tests/map-test.c  | 1 +
>> tests/os-wrappers-test.c  | 1 +
>> tests/queue-test.c| 1 +
>> tests/resources-test.c| 1 +
>> tests/test-compositor.c   | 1 +
>> tests/test-compositor.h   | 1 +
>> 17 files changed, 18 insertions(+)
>> 
>> diff --git a/cursor/cursor-data.h b/cursor/cursor-data.h
>> index 0d03cd5..dd7a80a 100644
>> --- a/cursor/cursor-data.h
>> +++ b/cursor/cursor-data.h
>> @@ -25,6 +25,8 @@
>> * Author:  Keith Packard, SuSE, Inc.
>> */
>> 
>> +#include 
>> +
>> static uint32_t cursor_data[] = {
>>  0x, 0x, 0x, 0x, 0x, 0x,
>>  0x, 0x, 0x, 0x, 0x, 0x,
>> diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
>> index 18abe87..d40c5c8 100644
>> --- a/cursor/wayland-cursor.c
>> +++ b/cursor/wayland-cursor.c
>> @@ -29,6 +29,7 @@
>> #include "wayland-client.h"
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/src/event-loop.c b/src/event-loop.c
>> index 32216a7..6130d2a 100644
>> --- a/src/event-loop.c
>> +++ b/src/event-loop.c
>> @@ -28,6 +28,7 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/src/scanner.c b/src/scanner.c
>> index ebae4cc..d501ba7 100644
>> --- a/src/scanner.c
>> +++ b/src/scanner.c
>> @@ -31,6 +31,7 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h
>> index dfd3e18..03e781b 100644
>> --- a/src/wayland-client-core.h
>> +++ b/src/wayland-client-core.h
>> @@ -26,6 +26,7 @@
>> #ifndef WAYLAND_CLIENT_CORE_H
>> #define WAYLAND_CLIENT_CORE_H
>> 
>> +#include 
>> #include "wayland-util.h"
>> #include "wayland-version.h"
>> 
>> diff --git a/src/wayland-private.h b/src/wayland-private.h
>> index 045109b..adfbe01 100644
>> --- a/src/wayland-private.h
>> +++ b/src/wayland-private.h
>> @@ -30,6 +30,7 @@
>> 
>> #include 
>> #include 
>> +#include 
>> 
>> #define WL_HIDE_DEPRECATED 1
>> 
>> diff --git a/src/wayland-server.h b/src/wayland-server.h
>> index a6e7951..f11fb4d 100644
>> --- a/src/wayland-server.h
>> +++ b/src/wayland-server.h
>> @@ -36,6 +36,7 @@
>> #ifndef WAYLAND_SERVER_H
>> #define WAYLAND_SERVER_H
>> 
>> +#include 
>> #include "wayland-server-core.h"
>> 
>> #ifdef  __cplusplus
>> diff --git a/src/wayland-shm.c b/src/wayland-shm.c
>> index 20bb8c8..7fea364 100644
>> --- a/src/wayland-shm.c
>> +++ b/src/wayland-shm.c
>> @@ -33,6 +33,7 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/tests/connection-test.c b/tests/connection-test.c
>> index 5d97fd9..3e34f77 100644
>> --- a/tests/connection-test.c
>> +++ b/tests/connection-test.c
>> @@ -27,6 +27,7 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/tests/display-test.c b/tests/display-test.c
>> index 17956db..f4800ce 100644
>> --- a/tests/display-test.c
>> +++ b/tests/display-test.c
>> @@ -28,6 +28,7 @@
>> #include 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
>> index ae5ff94..33566b4 100644
>> --- a/tests/event-loop-test.c
>> +++ b/tests/event-loop-test.c
>> @@ -25,6 +25,7 @@
>>  */
>> 
>> #include 
>> +#include 
>> #include 
>> #include 
>> #include 
>> diff --git a/tests/map-test.c b/tests/map-test.c
>> index d259048..8ecc1aa 100644
>> --- a/tests/map-test.c
>> +++ b/tests/map-test.c
>> @@ -25,6 +25,7 @@
>> 
>> #include 
>> #include 
>> +#include 
>> #include 
>> #include "wayland-private.h"
>> #include "test-runner.h"
>> diff --git a/tests/os-wrappers-test.c b/tests/os-wrappers-test.c
>> index b636b62..102622c 100644
>> --- a/tests/os-wrappers-test.c
>> +++ b/tests/os-wrappers-test.c
>> @@ -27,6 +27,7 @@
>> #define _GNU_SOURCE
>> 
>> #include 
>> +#include 
>> 

Re: Introduction and updates from NVIDIA

2016-07-19 Thread James Jones

On 06/13/2016 03:14 AM, Martin Peres wrote:

On 13/06/16 12:32, Martin Peres wrote:

This discussion has been going on for years (not this thread, the general
discussion).


Pekka made me realize on IRC that I was not specific enough
about what I mean here.

By discussion here, I am talking about sharing buffers
across blocks/drivers/manufacturers while honouring
Wayland's mantra of every frame being perfect and being
as efficient as possible. This is related to Google's
GRalloc, GBM, EGLStreams and probably more.


Thanks for proposing this Martin.

This sounds great, and we're happy to participate if we can get together 
a quorum.


Besides the people who were most vocal in this thread, it would be good 
to have perspective from several of the ARM SoCs and Google (ChromeOS 
and Android).


I'll reach out to some of my contacts there to make sure the right 
groups will be represented at XDC, and we'll get the right NVIDIA people 
signed up.


Thanks,
-James


___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Weston on framebuffer?

2016-07-19 Thread Christer Weinigel
Hi,

I'm trying to port Linux to a Samsung S3C2416 based system (actually an
oscilloscope, http://blog.weinigel.se/2016/05/01/sds7102-hacking.html).

The S3C2416 is a 400MHz ARM9 with a fairly dumb framebuffer, it has some
2D acceleration (pixel/line drawing with alpha, copy rectangle with
alpha and/or color key) but as far as I can tell nobody has added Linux
support for it.

I'm going to need some kind of GUI for the box and somebody mentioned
that Weston has framebuffer support nowdays.  I turned on the Weston
config option in buildroot (2015.5) and managed to get something that
didn't work to begin with, the OS abstraction stuff requires support for
posix_fadvise but for some reason that didn't work with ulibc but I
hacked around that.  libinput didn't like eudev and didn't want to
recognize a USB keyboard and USB mouse to begin with but I just
hardcoded the device type instead of relying on udev to tag the devices.

With this I managed to get a desktop and was unable to start
wayland-terminal.  Redrawing of the graphics felt fairly snappy, but the
lag from pressing a key on the keyboard until a character showed up in
the terminal was slow, probably between a quarter to half a second.

So my question is if this is the performance I should expect with weston
on a 400MHz ARM9 and a dumb framebuffer?  Have I done something stupid
and there are easy ways to speed it up?

Is there any documentation on how to convert the framebuffer driver for
the S3C2416 to a KMS driver and how to add acceleration support?  Can
weston use this?

Or is wayland/weston not really suited for this kind of old hardware and
what should I use in that case?

  /Christer

___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


[PATCHv2 weston] include stdint.h for int32_t/uint32_t

2016-07-19 Thread Jussi Kukkonen
Signed-off-by: Jussi Kukkonen 
---
 clients/editor.c| 1 +
 clients/eventdemo.c | 1 +
 clients/ivi-shell-user-interface.c  | 1 +
 clients/keyboard.c  | 1 +
 clients/multi-resource.c| 1 +
 clients/nested-client.c | 1 +
 clients/presentation-shm.c  | 1 +
 clients/scaler.c| 1 +
 clients/simple-damage.c | 1 +
 clients/simple-dmabuf-intel.c   | 1 +
 clients/simple-dmabuf-v4l.c | 1 +
 clients/simple-egl.c| 1 +
 clients/simple-shm.c| 1 +
 clients/simple-touch.c  | 1 +
 clients/stacking.c  | 1 +
 clients/weston-info.c   | 1 +
 clients/weston-simple-im.c  | 1 +
 clients/window.h| 1 +
 compositor/cms-colord.c | 1 +
 compositor/cms-helper.c | 1 +
 compositor/main.c   | 1 +
 compositor/screen-share.c   | 1 +
 compositor/text-backend.c   | 1 +
 compositor/weston-screenshooter.c   | 1 +
 desktop-shell/exposay.c | 1 +
 desktop-shell/input-panel.c | 1 +
 desktop-shell/shell.c   | 1 +
 desktop-shell/shell.h   | 1 +
 fullscreen-shell/fullscreen-shell.c | 1 +
 ivi-shell/hmi-controller.c  | 1 +
 ivi-shell/input-panel-ivi.c | 1 +
 ivi-shell/ivi-layout-export.h   | 2 ++
 ivi-shell/ivi-layout-private.h  | 2 ++
 ivi-shell/ivi-layout-transition.c   | 1 +
 ivi-shell/ivi-layout.c  | 1 +
 ivi-shell/ivi-shell.c   | 1 +
 ivi-shell/ivi-shell.h   | 1 +
 libweston/animation.c   | 1 +
 libweston/bindings.c| 1 +
 libweston/clipboard.c   | 1 +
 libweston/compositor-drm.c  | 1 +
 libweston/compositor-fbdev.c| 1 +
 libweston/compositor-fbdev.h| 2 ++
 libweston/compositor-headless.c | 1 +
 libweston/compositor-headless.h | 2 ++
 libweston/compositor-rdp.c  | 1 +
 libweston/compositor-wayland.c  | 1 +
 libweston/compositor-wayland.h  | 2 ++
 libweston/compositor-x11.c  | 1 +
 libweston/compositor-x11.h  | 2 ++
 libweston/compositor.h  | 1 +
 libweston/data-device.c | 1 +
 libweston/dbus.c| 1 +
 libweston/gl-renderer.c | 1 +
 libweston/gl-renderer.h | 2 ++
 libweston/launcher-logind.c | 1 +
 libweston/launcher-util.c   | 1 +
 libweston/launcher-weston-launch.c  | 1 +
 libweston/libbacklight.c| 1 +
 libweston/libinput-device.c | 1 +
 libweston/libinput-seat.c   | 1 +
 libweston/linux-dmabuf.c| 1 +
 libweston/noop-renderer.c   | 1 +
 libweston/pixman-renderer.c | 1 +
 libweston/screenshooter.c   | 1 +
 libweston/spring-tool.c | 2 ++
 libweston/zoom.c| 1 +
 shared/config-parser.c  | 1 +
 shared/config-parser.h  | 2 ++
 shared/frame.c  | 1 +
 shared/image-loader.c   | 1 +
 shared/xalloc.c | 1 +
 shared/xalloc.h | 1 +
 tests/buffer-count-test.c   | 1 +
 tests/internal-screenshot-test.c| 1 +
 tests/ivi_layout-internal-test.c| 1 +
 tests/ivi_layout-test-plugin.c  | 1 +
 tests/ivi_layout-test.c | 1 +
 tests/keyboard-test.c   | 2 ++
 tests/presentation-test.c   | 1 +
 tests/surface-global-test.c | 1 +
 tests/surface-screenshot.c  | 1 +
 tests/text-test.c   | 1 +
 tests/weston-test-client-helper.c   | 1 +
 tests/weston-test-client-helper.h   | 1 +
 tests/weston-test.c | 1 +
 wcap/wcap-decode.h  | 2 ++
 xwayland/dnd.c  | 1 +
 xwayland/hash.h | 2 ++
 xwayland/launcher.c | 1 +
 xwayland/selection.c| 1 +
 xwayland/window-manager.c   | 1 +
 92 files changed, 104 insertions(+)

diff --git a/clients/editor.c b/clients/editor.c
index e081a5b..b34ef42 100644
--- a/clients/editor.c
+++ b/clients/editor.c
@@ -25,6 +25,7 @@
 #include "config.h"
 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/clients/eventdemo.c b/clients/eventdemo.c
index f04e39b..d8eef5b 100644
--- a/clients/eventdemo.c
+++ b/clients/eventdemo.c
@@ -33,6 +33,7 @@
 
 #include "config.h"
 
+#include 
 #include 
 #include 
 #include 
diff --git a/clients/ivi-shell-user-interface.c 
b/clients/ivi-shell-user-interface.c
index 06b79a2..6ae4f7c 100644
--- a/clients/ivi-shell-user-interface.c
+++ b/clients/ivi-shell-user-interface.c
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
diff --git a/clients/keyboard.c b/clients/keyboard.c
index bcb346a..9af3f41 100644
--- a/clients/keyboard.c
+++ b/clients/keyboard.c
@@ -25,6 +25,7 @@
 #include "config.h"
 
 #include 

Re: [PATCH libinput 5/6] touchpad: change palm detection trigger functions to bools

2016-07-19 Thread Eric Engestrom
On Tue, Jul 19, 2016 at 10:49:28AM +1000, Peter Hutterer wrote:
> And rename to make it more obvious what the return value means.
> 
> Signed-off-by: Peter Hutterer 
> ---
>  src/evdev-mt-touchpad.c | 28 +++-
>  1 file changed, 15 insertions(+), 13 deletions(-)
> 
> diff --git a/src/evdev-mt-touchpad.c b/src/evdev-mt-touchpad.c
> index 7ee86a9..190448b 100644
> --- a/src/evdev-mt-touchpad.c
> +++ b/src/evdev-mt-touchpad.c
> @@ -573,15 +573,17 @@ tp_palm_tap_is_palm(const struct tp_dispatch *tp, const 
> struct tp_touch *t)
>   return false;
>  }
>  
> -static int
> -tp_palm_detect_dwt(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
> +static bool
> +tp_palm_detect_dwt_triggered(struct tp_dispatch *tp,
> +  struct tp_touch *t,
> +  uint64_t time)
>  {
>   if (tp->dwt.dwt_enabled &&
>   tp->dwt.keyboard_active &&
>   t->state == TOUCH_BEGIN) {
>   t->palm.state = PALM_TYPING;
>   t->palm.first = t->point;
> - return 1;
> + return true;
>   } else if (!tp->dwt.keyboard_active &&
>  t->state == TOUCH_UPDATE &&
>  t->palm.state == PALM_TYPING) {
> @@ -599,22 +601,22 @@ tp_palm_detect_dwt(struct tp_dispatch *tp, struct 
> tp_touch *t, uint64_t time)
>   }
>   }
>  
> - return 0;
> + return false;
>  }
>  
> -static int
> -tp_palm_detect_trackpoint(struct tp_dispatch *tp,
> -   struct tp_touch *t,
> -   uint64_t time)
> +static bool
> +tp_palm_detect_trackpoint_triggered(struct tp_dispatch *tp,
> + struct tp_touch *t,
> + uint64_t time)
>  {
>   if (!tp->palm.monitor_trackpoint)
> - return 0;
> + return false;
>  
>   if (t->palm.state == PALM_NONE &&
>   t->state == TOUCH_BEGIN &&
>   tp->palm.trackpoint_active) {
>   t->palm.state = PALM_TRACKPOINT;
> - return 1;
> + return true;
>   } else if (t->palm.state == PALM_TRACKPOINT &&
>  t->state == TOUCH_UPDATE &&
>  !tp->palm.trackpoint_active) {
> @@ -627,7 +629,7 @@ tp_palm_detect_trackpoint(struct tp_dispatch *tp,
>   }
>   }
>  
> - return 0;
> + return false;
>  }
>  
>  static inline bool
> @@ -684,10 +686,10 @@ static void
>  tp_palm_detect(struct tp_dispatch *tp, struct tp_touch *t, uint64_t time)
>  {
>  
> - if (tp_palm_detect_dwt(tp, t, time))
> + if (tp_palm_detect_dwt_triggered(tp, t, time))
>   goto out;
>  
> - if (tp_palm_detect_trackpoint(tp, t, time))
> + if (tp_palm_detect_trackpoint_triggered(tp, t, time))
>   goto out;
>  
>   if (t->palm.state == PALM_EDGE) {
> -- 
> 2.7.4

I feel like the "detect" + "triggered" combo is a bit confusing, and
`tp_palm_dwt_triggered()` & `tp_palm_trackpoint_triggered()` might be
better names.

Either way this whole series is welcome, and is
Reviewed-by: Eric Engestrom 

BTW I was reading an article a few days ago about what a mess the
success-like return values are in the C world. Maybe you read it too? ^^

Cheers,
  Eric
___
wayland-devel mailing list
wayland-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/wayland-devel


Re: [PATCH wayland] (multiple): Include stdint.h

2016-07-19 Thread Eric Engestrom
On Mon, Jul 18, 2016 at 12:42:25PM -0500, Yong Bakos wrote:
> From: Yong Bakos 
> 
> Some headers and source files have been using types such as uint32_t
> without explicitly including stdint.h.
> 
> Explicitly include stdint.h where appropriate.
> 
> Signed-off-by: Yong Bakos 

Matches my grep.
Reviewed-by: Eric Engestrom 

> ---
>  cursor/cursor-data.h  | 2 ++
>  cursor/wayland-cursor.c   | 1 +
>  src/event-loop.c  | 1 +
>  src/scanner.c | 1 +
>  src/wayland-client-core.h | 1 +
>  src/wayland-private.h | 1 +
>  src/wayland-server.h  | 1 +
>  src/wayland-shm.c | 1 +
>  tests/connection-test.c   | 1 +
>  tests/display-test.c  | 1 +
>  tests/event-loop-test.c   | 1 +
>  tests/map-test.c  | 1 +
>  tests/os-wrappers-test.c  | 1 +
>  tests/queue-test.c| 1 +
>  tests/resources-test.c| 1 +
>  tests/test-compositor.c   | 1 +
>  tests/test-compositor.h   | 1 +
>  17 files changed, 18 insertions(+)
> 
> diff --git a/cursor/cursor-data.h b/cursor/cursor-data.h
> index 0d03cd5..dd7a80a 100644
> --- a/cursor/cursor-data.h
> +++ b/cursor/cursor-data.h
> @@ -25,6 +25,8 @@
>  * Author:  Keith Packard, SuSE, Inc.
>  */
>  
> +#include 
> +
>  static uint32_t cursor_data[] = {
>   0x, 0x, 0x, 0x, 0x, 0x,
>   0x, 0x, 0x, 0x, 0x, 0x,
> diff --git a/cursor/wayland-cursor.c b/cursor/wayland-cursor.c
> index 18abe87..d40c5c8 100644
> --- a/cursor/wayland-cursor.c
> +++ b/cursor/wayland-cursor.c
> @@ -29,6 +29,7 @@
>  #include "wayland-client.h"
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/src/event-loop.c b/src/event-loop.c
> index 32216a7..6130d2a 100644
> --- a/src/event-loop.c
> +++ b/src/event-loop.c
> @@ -28,6 +28,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/src/scanner.c b/src/scanner.c
> index ebae4cc..d501ba7 100644
> --- a/src/scanner.c
> +++ b/src/scanner.c
> @@ -31,6 +31,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/src/wayland-client-core.h b/src/wayland-client-core.h
> index dfd3e18..03e781b 100644
> --- a/src/wayland-client-core.h
> +++ b/src/wayland-client-core.h
> @@ -26,6 +26,7 @@
>  #ifndef WAYLAND_CLIENT_CORE_H
>  #define WAYLAND_CLIENT_CORE_H
>  
> +#include 
>  #include "wayland-util.h"
>  #include "wayland-version.h"
>  
> diff --git a/src/wayland-private.h b/src/wayland-private.h
> index 045109b..adfbe01 100644
> --- a/src/wayland-private.h
> +++ b/src/wayland-private.h
> @@ -30,6 +30,7 @@
>  
>  #include 
>  #include 
> +#include 
>  
>  #define WL_HIDE_DEPRECATED 1
>  
> diff --git a/src/wayland-server.h b/src/wayland-server.h
> index a6e7951..f11fb4d 100644
> --- a/src/wayland-server.h
> +++ b/src/wayland-server.h
> @@ -36,6 +36,7 @@
>  #ifndef WAYLAND_SERVER_H
>  #define WAYLAND_SERVER_H
>  
> +#include 
>  #include "wayland-server-core.h"
>  
>  #ifdef  __cplusplus
> diff --git a/src/wayland-shm.c b/src/wayland-shm.c
> index 20bb8c8..7fea364 100644
> --- a/src/wayland-shm.c
> +++ b/src/wayland-shm.c
> @@ -33,6 +33,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/tests/connection-test.c b/tests/connection-test.c
> index 5d97fd9..3e34f77 100644
> --- a/tests/connection-test.c
> +++ b/tests/connection-test.c
> @@ -27,6 +27,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/tests/display-test.c b/tests/display-test.c
> index 17956db..f4800ce 100644
> --- a/tests/display-test.c
> +++ b/tests/display-test.c
> @@ -28,6 +28,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/tests/event-loop-test.c b/tests/event-loop-test.c
> index ae5ff94..33566b4 100644
> --- a/tests/event-loop-test.c
> +++ b/tests/event-loop-test.c
> @@ -25,6 +25,7 @@
>   */
>  
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/tests/map-test.c b/tests/map-test.c
> index d259048..8ecc1aa 100644
> --- a/tests/map-test.c
> +++ b/tests/map-test.c
> @@ -25,6 +25,7 @@
>  
>  #include 
>  #include 
> +#include 
>  #include 
>  #include "wayland-private.h"
>  #include "test-runner.h"
> diff --git a/tests/os-wrappers-test.c b/tests/os-wrappers-test.c
> index b636b62..102622c 100644
> --- a/tests/os-wrappers-test.c
> +++ b/tests/os-wrappers-test.c
> @@ -27,6 +27,7 @@
>  #define _GNU_SOURCE
>  
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git a/tests/queue-test.c b/tests/queue-test.c
> index 932bc55..86a3602 100644
> --- a/tests/queue-test.c
> +++ b/tests/queue-test.c
> @@ -24,6 +24,7 @@
>   */
>  
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> diff --git