[mutter] barrier/x11: Let the seat bind the input events for us
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] barrier/x11: Let the seat bind the input events for us
- Date: Fri, 2 Sep 2022 07:01:52 +0000 (UTC)
commit eb764e0f0d0a77b2c0729804ae00fad1b3768176
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Thu Sep 1 23:02:00 2022 +0200
barrier/x11: Let the seat bind the input events for us
Without doing this, the events bound by the X11 barrier manager will get
overridden by the ones later bound by the seat.
Fixes: 0debb24e12d7b2f60d489b31981019f5f7b9b508
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2394
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2604>
src/backends/x11/meta-barrier-x11.c | 8 --------
src/backends/x11/meta-seat-x11.c | 6 ++++++
2 files changed, 6 insertions(+), 8 deletions(-)
---
diff --git a/src/backends/x11/meta-barrier-x11.c b/src/backends/x11/meta-barrier-x11.c
index 45ea1421b6..e63c3096bf 100644
--- a/src/backends/x11/meta-barrier-x11.c
+++ b/src/backends/x11/meta-barrier-x11.c
@@ -212,20 +212,12 @@ meta_barrier_impl_x11_init (MetaBarrierImplX11 *self)
MetaX11Barriers *
meta_x11_barriers_new (MetaBackendX11 *backend_x11)
{
- Display *xdisplay = meta_backend_x11_get_xdisplay (backend_x11);
- Window root = meta_backend_x11_get_root_xwindow (backend_x11);
MetaX11Barriers *x11_barriers;
- unsigned char mask_bits[XIMaskLen (XI_LASTEVENT)] = {};
- XIEventMask mask = { XIAllMasterDevices, sizeof (mask_bits), mask_bits };
x11_barriers = g_new0 (MetaX11Barriers, 1);
x11_barriers->barriers = g_hash_table_new (meta_unsigned_long_hash,
meta_unsigned_long_equal);
- XISetMask (mask.mask, XI_BarrierHit);
- XISetMask (mask.mask, XI_BarrierLeave);
- XISelectEvents (xdisplay, root, &mask, 1);
-
return x11_barriers;
}
diff --git a/src/backends/x11/meta-seat-x11.c b/src/backends/x11/meta-seat-x11.c
index c8e690faaf..e972c80c65 100644
--- a/src/backends/x11/meta-seat-x11.c
+++ b/src/backends/x11/meta-seat-x11.c
@@ -1441,6 +1441,12 @@ meta_seat_x11_constructed (GObject *object)
XISetMask (mask, XI_RawButtonPress);
XISetMask (mask, XI_RawButtonRelease);
+ if (meta_backend_x11_get_barriers (META_BACKEND_X11 (seat_x11->backend)))
+ {
+ XISetMask (mask, XI_BarrierHit);
+ XISetMask (mask, XI_BarrierLeave);
+ }
+
event_mask.deviceid = XIAllMasterDevices;
event_mask.mask_len = sizeof (mask);
event_mask.mask = mask;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]