mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 17:10:40 -05:00
wayland-pointer: Bail unconditionally if without native backend
Using `-Dnative_backend=false` caused build failure due to a missing (implicit) definition of `META_IS_BACKEND_X11`. But if we define it properly then that just leaves some of the function's locals uninitialized and it will never work anyway. Just return unconditionally if there's no native backend to initialize the variables. Closes: https://gitlab.gnome.org/GNOME/mutter/issues/1025
This commit is contained in:
parent
76240e24f7
commit
06dae3a8cc
@ -283,6 +283,7 @@ void
|
|||||||
meta_wayland_pointer_send_relative_motion (MetaWaylandPointer *pointer,
|
meta_wayland_pointer_send_relative_motion (MetaWaylandPointer *pointer,
|
||||||
const ClutterEvent *event)
|
const ClutterEvent *event)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_NATIVE_BACKEND
|
||||||
struct wl_resource *resource;
|
struct wl_resource *resource;
|
||||||
double dx, dy;
|
double dx, dy;
|
||||||
double dx_unaccel, dy_unaccel;
|
double dx_unaccel, dy_unaccel;
|
||||||
@ -296,21 +297,14 @@ meta_wayland_pointer_send_relative_motion (MetaWaylandPointer *pointer,
|
|||||||
if (!pointer->focus_client)
|
if (!pointer->focus_client)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
|
||||||
if (!META_IS_BACKEND_NATIVE (backend) ||
|
if (!META_IS_BACKEND_NATIVE (backend) ||
|
||||||
!meta_event_native_get_relative_motion (event,
|
!meta_event_native_get_relative_motion (event,
|
||||||
&dx, &dy,
|
&dx, &dy,
|
||||||
&dx_unaccel, &dy_unaccel))
|
&dx_unaccel, &dy_unaccel))
|
||||||
return;
|
return;
|
||||||
#else
|
|
||||||
if (META_IS_BACKEND_X11 (backend))
|
|
||||||
return;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_NATIVE_BACKEND
|
|
||||||
time_us = meta_event_native_get_time_usec (event);
|
time_us = meta_event_native_get_time_usec (event);
|
||||||
if (time_us == 0)
|
if (time_us == 0)
|
||||||
#endif
|
|
||||||
time_us = clutter_event_get_time (event) * 1000ULL;
|
time_us = clutter_event_get_time (event) * 1000ULL;
|
||||||
time_us_hi = (uint32_t) (time_us >> 32);
|
time_us_hi = (uint32_t) (time_us >> 32);
|
||||||
time_us_lo = (uint32_t) time_us;
|
time_us_lo = (uint32_t) time_us;
|
||||||
@ -330,6 +324,7 @@ meta_wayland_pointer_send_relative_motion (MetaWaylandPointer *pointer,
|
|||||||
dx_unaccelf,
|
dx_unaccelf,
|
||||||
dy_unaccelf);
|
dy_unaccelf);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user