[mutter/wip/carlosg/x11less-preparations: 73/87] core: Separate checks for pointer barriers availability
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/x11less-preparations: 73/87] core: Separate checks for pointer barriers availability
- Date: Fri, 3 May 2019 15:31:38 +0000 (UTC)
commit 3360bbddbba78b8a87f6954a4b8c04fcacf63727
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Dec 30 13:34:06 2018 +0100
core: Separate checks for pointer barriers availability
If the check happens on --nested (X11 backend) while there is no X11
display we would get a crash. Since the barriers are non-effective on
nested, just take it out into a separate condition.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/420
src/core/display.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/core/display.c b/src/core/display.c
index ea05ddc71..84ada6c22 100644
--- a/src/core/display.c
+++ b/src/core/display.c
@@ -49,6 +49,7 @@
#include "backends/meta-logical-monitor.h"
#include "backends/meta-stage-private.h"
#include "backends/x11/meta-backend-x11.h"
+#include "backends/x11/cm/meta-backend-x11-cm.h"
#include "clutter/x11/clutter-x11.h"
#include "core/bell.h"
#include "core/boxes-private.h"
@@ -2597,10 +2598,12 @@ meta_display_supports_extended_barriers (MetaDisplay *display)
return TRUE;
#endif
- if (META_IS_BACKEND_X11 (meta_get_backend ()))
+ if (META_IS_BACKEND_X11_CM (meta_get_backend ()))
{
- return (META_X11_DISPLAY_HAS_XINPUT_23 (display->x11_display) &&
- !meta_is_wayland_compositor());
+ if (meta_is_wayland_compositor())
+ return FALSE;
+
+ return META_X11_DISPLAY_HAS_XINPUT_23 (display->x11_display);
}
g_assert_not_reached ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]