Xi: add FreeInputMask function
Does what it says on the box, complements MakeInputMask. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
parent
ee9346bb31
commit
61ef4daf64
|
@ -1678,6 +1678,13 @@ MakeInputMasks(WindowPtr pWin)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
FreeInputMask(OtherInputMasks **imask)
|
||||||
|
{
|
||||||
|
free(*imask);
|
||||||
|
*imask = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
RecalculateDeviceDeliverableEvents(WindowPtr pWin)
|
RecalculateDeviceDeliverableEvents(WindowPtr pWin)
|
||||||
{
|
{
|
||||||
|
@ -1737,8 +1744,9 @@ InputClientGone(WindowPtr pWin, XID id)
|
||||||
FreeInputClient(&other);
|
FreeInputClient(&other);
|
||||||
} else if (!(other->next)) {
|
} else if (!(other->next)) {
|
||||||
if (ShouldFreeInputMasks(pWin, TRUE)) {
|
if (ShouldFreeInputMasks(pWin, TRUE)) {
|
||||||
wOtherInputMasks(pWin)->inputClients = other->next;
|
OtherInputMasks *mask = wOtherInputMasks(pWin);
|
||||||
free(wOtherInputMasks(pWin));
|
mask->inputClients = other->next;
|
||||||
|
FreeInputMask(&mask);
|
||||||
pWin->optional->inputMasks = (OtherInputMasks *) NULL;
|
pWin->optional->inputMasks = (OtherInputMasks *) NULL;
|
||||||
CheckWindowOptionalNeed(pWin);
|
CheckWindowOptionalNeed(pWin);
|
||||||
FreeInputClient(&other);
|
FreeInputClient(&other);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user