summaryrefslogtreecommitdiff
path: root/Xi/xibarriers.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xi/xibarriers.c')
-rw-r--r--Xi/xibarriers.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c
index d0be70135..1926762ad 100644
--- a/Xi/xibarriers.c
+++ b/Xi/xibarriers.c
@@ -611,7 +611,9 @@ CreatePointerBarrierClient(ClientPtr client,
}
pbd->deviceid = dev->id;
+ input_lock();
xorg_list_add(&pbd->entry, &ret->per_device);
+ input_unlock();
}
ret->id = stuff->barrier;
@@ -626,7 +628,9 @@ CreatePointerBarrierClient(ClientPtr client,
ret->barrier.directions &= ~(BarrierPositiveX | BarrierNegativeX);
if (barrier_is_vertical(&ret->barrier))
ret->barrier.directions &= ~(BarrierPositiveY | BarrierNegativeY);
+ input_lock();
xorg_list_add(&ret->entry, &cs->barriers);
+ input_unlock();
*client_out = ret;
return Success;
@@ -689,7 +693,9 @@ BarrierFreeBarrier(void *data, XID id)
mieqEnqueue(dev, (InternalEvent *) &ev);
}
+ input_lock();
xorg_list_del(&c->entry);
+ input_unlock();
FreePointerBarrierClient(c);
return Success;
@@ -709,7 +715,9 @@ static void add_master_func(void *res, XID id, void *devid)
pbd = AllocBarrierDevice();
pbd->deviceid = *deviceid;
+ input_lock();
xorg_list_add(&pbd->entry, &barrier->per_device);
+ input_unlock();
}
static void remove_master_func(void *res, XID id, void *devid)
@@ -752,7 +760,9 @@ static void remove_master_func(void *res, XID id, void *devid)
mieqEnqueue(dev, (InternalEvent *) &ev);
}
+ input_lock();
xorg_list_del(&pbd->entry);
+ input_unlock();
free(pbd);
}