From aee161ba075b1fb1458b5ae0740a5e35102da54d Mon Sep 17 00:00:00 2001 From: marha Date: Mon, 7 Jan 2013 16:33:55 +0100 Subject: Solved some more problems due to latest merge --- xorg-server/Xi/exevents.c | 2 +- xorg-server/Xi/xibarriers.c | 89 ++++++++++++++++++++++----------------------- 2 files changed, 45 insertions(+), 46 deletions(-) (limited to 'xorg-server/Xi') diff --git a/xorg-server/Xi/exevents.c b/xorg-server/Xi/exevents.c index b34292594..6d5443341 100644 --- a/xorg-server/Xi/exevents.c +++ b/xorg-server/Xi/exevents.c @@ -1671,7 +1671,7 @@ ProcessBarrierEvent(InternalEvent *e, DeviceIntPtr dev) rc = EventToXI2(e, &ev); if (rc != Success) { - ErrorF("[Xi] event conversion from %s failed with code %d\n", __func__, rc); + ErrorF("[Xi] event conversion from %s failed with code %d\n", __FUNCTION__, rc); return; } diff --git a/xorg-server/Xi/xibarriers.c b/xorg-server/Xi/xibarriers.c index 7b7b83f1c..2aa4f51ff 100644 --- a/xorg-server/Xi/xibarriers.c +++ b/xorg-server/Xi/xibarriers.c @@ -398,19 +398,18 @@ input_constrain_cursor(DeviceIntPtr dev, ScreenPtr screen, struct PointerBarrier *nearest = NULL; PointerBarrierClientPtr c; Time ms = GetTimeInMillis(); - BarrierEvent ev = { - .header = ET_Internal, - .type = 0, - .length = sizeof (BarrierEvent), - .time = ms, - .deviceid = dev->id, - .sourceid = dev->id, - .dx = dest_x - current_x, - .dy = dest_y - current_y, - .root = screen->root->drawable.id, - }; InternalEvent *barrier_events = events; DeviceIntPtr master; + BarrierEvent ev; + ev.header = ET_Internal; + ev.type = 0; + ev.length = sizeof (BarrierEvent); + ev.time = ms; + ev.deviceid = dev->id; + ev.sourceid = dev->id; + ev.dx = dest_x - current_x; + ev.dy = dest_y - current_y; + ev.root = screen->root->drawable.id; if (nevents) *nevents = 0; @@ -648,24 +647,24 @@ BarrierFreeBarrier(void *data, XID id) for (dev = inputInfo.devices; dev; dev = dev->next) { struct PointerBarrierDevice *pbd; int root_x, root_y; - BarrierEvent ev = { - .header = ET_Internal, - .type = ET_BarrierLeave, - .length = sizeof (BarrierEvent), - .time = ms, - /* .deviceid */ - .sourceid = 0, - .barrierid = c->id, - .window = c->window, - .root = screen->root->drawable.id, - .dx = 0, - .dy = 0, - /* .root_x */ - /* .root_y */ - /* .dt */ - /* .event_id */ - .flags = XIBarrierPointerReleased, - }; + BarrierEvent ev; + ev.header = ET_Internal; + ev.type = ET_BarrierLeave; + ev.length = sizeof (BarrierEvent); + ev.time = ms; + /* .deviceid */ + ev.sourceid = 0; + ev.barrierid = c->id; + ev.window = c->window; + ev.root = screen->root->drawable.id; + ev.dx = 0; + ev.dy = 0; + /* .root_x */ + /* .root_y */ + /* .dt */ + /* .event_id */ + ev.flags = XIBarrierPointerReleased; + if (dev->type != MASTER_POINTER) @@ -729,22 +728,22 @@ static void remove_master_func(pointer res, XID id, pointer devid) pbd = GetBarrierDevice(barrier, *deviceid); if (pbd->hit) { - BarrierEvent ev = { - .header = ET_Internal, - .type =ET_BarrierLeave, - .length = sizeof (BarrierEvent), - .time = ms, - .deviceid = *deviceid, - .sourceid = 0, - .dx = 0, - .dy = 0, - .root = barrier->screen->root->drawable.id, - .window = barrier->window, - .dt = ms - pbd->last_timestamp, - .flags = XIBarrierPointerReleased, - .event_id = pbd->barrier_event_id, - .barrierid = barrier->id, - }; + BarrierEvent ev; + ev.header = ET_Internal; + ev.type =ET_BarrierLeave; + ev.length = sizeof (BarrierEvent); + ev.time = ms; + ev.deviceid = *deviceid; + ev.sourceid = 0; + ev.dx = 0; + ev.dy = 0; + ev.root = barrier->screen->root->drawable.id; + ev.window = barrier->window; + ev.dt = ms - pbd->last_timestamp; + ev.flags = XIBarrierPointerReleased; + ev.event_id = pbd->barrier_event_id; + ev.barrierid = barrier->id; + mieqEnqueue(dev, (InternalEvent *) &ev); } -- cgit v1.2.3