From: U. Artie Eoff Date: Tue, 16 Sep 2014 20:03:15 +0000 (-0700) Subject: weston-wfits: check output->make equal weston-X11 too X-Git-Tag: accepted/tizen/ivi/20141218.014850~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=229e5f087e6ff67fb02b0af5464080427a1a6d3d;p=test%2Fgeneric%2Fwayland-fits.git weston-wfits: check output->make equal weston-X11 too Weston changed the output->make for the x11-compositor from xwayland to weston-X11: http://cgit.freedesktop.org/wayland/weston/commit/?id=22e16b656f67ee577e32a7af91f443840fc3aee1 For uinput emulation on x11 backend, we need to check whether output->make is either weston-X11 or xwayland (for backwards compat) now. Signed-off-by: U. Artie Eoff --- diff --git a/src/extensions/weston/input-emulator-uinput.cpp b/src/extensions/weston/input-emulator-uinput.cpp index ee72878..9732d6e 100644 --- a/src/extensions/weston/input-emulator-uinput.cpp +++ b/src/extensions/weston/input-emulator-uinput.cpp @@ -124,7 +124,8 @@ static void screenSize(int32_t *width, int32_t *height) { struct weston_output *output(Globals::output()); - if (std::string(output->make) == "xwayland") { + std::string make(output->make); + if (make == "xwayland" or make == "weston-X11") { #if defined(HAVE_X11_SUPPORT) struct x11_compositor *x11_compositor = (struct x11_compositor*) Globals::compositor(); *width = x11_compositor->screen->width_in_pixels; @@ -165,7 +166,8 @@ static void toScreen(int32_t *x, int32_t *y) toDevice(x, y); - if (std::string(output->make) == "xwayland") { + std::string make(output->make); + if (make == "xwayland" or make == "weston-X11") { #if defined(HAVE_X11_SUPPORT) struct x11_compositor *x11_compositor = (struct x11_compositor*)Globals::compositor(); struct x11_output *x11_output = (struct x11_output*) output; @@ -211,7 +213,8 @@ InputEmulatorUInput::InputEmulatorUInput() weston_log("weston-wfits: %s\n", BOOST_CURRENT_FUNCTION); #ifndef HAVE_X11_SUPPORT - assert(std::string(Globals::output()->make) != "xwayland"); + std::string make(Globals::output()->make); + assert(make != "xwayland" and make != "weston-X11"); #endif assert(not Globals::isHeadless());