dix: Factor out DeliverMapNotify
Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
63843cb700
commit
d20cc0fca4
31
dix/window.c
31
dix/window.c
|
@ -2543,6 +2543,17 @@ MaybeDeliverMapRequest(WindowPtr pWin, WindowPtr pParent, ClientPtr client)
|
||||||
client) == 1;
|
client) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
DeliverMapNotify(WindowPtr pWin)
|
||||||
|
{
|
||||||
|
xEvent event = {
|
||||||
|
.u.mapNotify.window = pWin->drawable.id,
|
||||||
|
.u.mapNotify.override = pWin->overrideRedirect,
|
||||||
|
};
|
||||||
|
event.u.u.type = MapNotify;
|
||||||
|
DeliverEvents(pWin, &event, 1, NullWindow);
|
||||||
|
}
|
||||||
|
|
||||||
/*****
|
/*****
|
||||||
* MapWindow
|
* MapWindow
|
||||||
* If some other client has selected SubStructureReDirect on the parent
|
* If some other client has selected SubStructureReDirect on the parent
|
||||||
|
@ -2576,14 +2587,8 @@ MapWindow(WindowPtr pWin, ClientPtr client)
|
||||||
return Success;
|
return Success;
|
||||||
|
|
||||||
pWin->mapped = TRUE;
|
pWin->mapped = TRUE;
|
||||||
if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) {
|
if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin))
|
||||||
xEvent event = {
|
DeliverMapNotify(pWin);
|
||||||
.u.mapNotify.window = pWin->drawable.id,
|
|
||||||
.u.mapNotify.override = pWin->overrideRedirect,
|
|
||||||
};
|
|
||||||
event.u.u.type = MapNotify;
|
|
||||||
DeliverEvents(pWin, &event, 1, NullWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pParent->realized)
|
if (!pParent->realized)
|
||||||
return Success;
|
return Success;
|
||||||
|
@ -2650,14 +2655,8 @@ MapSubwindows(WindowPtr pParent, ClientPtr client)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
pWin->mapped = TRUE;
|
pWin->mapped = TRUE;
|
||||||
if (parentNotify || StrSend(pWin)) {
|
if (parentNotify || StrSend(pWin))
|
||||||
xEvent event = {
|
DeliverMapNotify(pWin);
|
||||||
.u.mapNotify.window = pWin->drawable.id,
|
|
||||||
.u.mapNotify.override = pWin->overrideRedirect
|
|
||||||
};
|
|
||||||
event.u.u.type = MapNotify;
|
|
||||||
DeliverEvents(pWin, &event, 1, NullWindow);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!pFirstMapped)
|
if (!pFirstMapped)
|
||||||
pFirstMapped = pWin;
|
pFirstMapped = pWin;
|
||||||
|
|
Loading…
Reference in New Issue