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: 0debb24e12
Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2394
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2604>
This commit is contained in:
parent
73bb333000
commit
eb764e0f0d
@ -212,20 +212,12 @@ meta_barrier_impl_x11_init (MetaBarrierImplX11 *self)
|
|||||||
MetaX11Barriers *
|
MetaX11Barriers *
|
||||||
meta_x11_barriers_new (MetaBackendX11 *backend_x11)
|
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;
|
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 = g_new0 (MetaX11Barriers, 1);
|
||||||
x11_barriers->barriers = g_hash_table_new (meta_unsigned_long_hash,
|
x11_barriers->barriers = g_hash_table_new (meta_unsigned_long_hash,
|
||||||
meta_unsigned_long_equal);
|
meta_unsigned_long_equal);
|
||||||
|
|
||||||
XISetMask (mask.mask, XI_BarrierHit);
|
|
||||||
XISetMask (mask.mask, XI_BarrierLeave);
|
|
||||||
XISelectEvents (xdisplay, root, &mask, 1);
|
|
||||||
|
|
||||||
return x11_barriers;
|
return x11_barriers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,6 +1441,12 @@ meta_seat_x11_constructed (GObject *object)
|
|||||||
XISetMask (mask, XI_RawButtonPress);
|
XISetMask (mask, XI_RawButtonPress);
|
||||||
XISetMask (mask, XI_RawButtonRelease);
|
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.deviceid = XIAllMasterDevices;
|
||||||
event_mask.mask_len = sizeof (mask);
|
event_mask.mask_len = sizeof (mask);
|
||||||
event_mask.mask = mask;
|
event_mask.mask = mask;
|
||||||
|
Loading…
Reference in New Issue
Block a user