mirror of
https://github.com/X11Libre/xserver.git
synced 2026-04-14 17:18:09 +00:00
xace: Fix a bad device access hook call.
Add a proper access mode, and reverse the logic of the return value.
Zero ("Success") is returned on success from the hook calls.
Signed-off-by: Eamon Walsh <ewalsh@tycho.nsa.gov>
This commit is contained in:
@@ -4088,10 +4088,10 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin)
|
||||
{
|
||||
xKeymapEvent ke;
|
||||
ClientPtr client = clients[CLIENT_ID(pWin->drawable.id)];
|
||||
if (XaceHook(XACE_DEVICE_ACCESS, client, dev, FALSE))
|
||||
memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
|
||||
else
|
||||
if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess))
|
||||
bzero((char *)&ke.map[0], 31);
|
||||
else
|
||||
memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31);
|
||||
|
||||
ke.type = KeymapNotify;
|
||||
DeliverEventsToWindow(dev, pWin, (xEvent *)&ke, 1,
|
||||
|
||||
Reference in New Issue
Block a user