weston-wfits: pointer/keyboard are not pointers in older Weston SDK's
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 4 Jun 2013 16:04:04 +0000 (09:04 -0700)
committerU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 4 Jun 2013 16:04:04 +0000 (09:04 -0700)
For backwards compatibility we can't do a pointer NULL check on
seat->keyboard or seat->pointer since those members were not pointers
in older Weston SDK's.  We only initialize them primarily to make
the extension work on the headless backend (which doesn't init a
pointer/keyboard), thus use isHeadless() as the condition for
initialization.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
src/extensions/weston/weston-wfits.cpp

index aa4c74a..37f97e7 100644 (file)
@@ -40,11 +40,8 @@ void Globals::init(struct weston_compositor *compositor)
 
        struct weston_seat *seat(Globals::seat());
 
-       if (not seat->pointer) {
+       if (isHeadless()) {
                weston_seat_init_pointer(seat);
-       }
-
-       if (not seat->keyboard) {
                weston_seat_init_keyboard(seat, NULL);
        }
 }