mirror of
https://github.com/X11Libre/xserver.git
synced 2026-10-07 23:02:23 +00:00
Use C99 designated initializers in extension Events
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Keith Packard <keithp@keithp.com> Tested-by: Daniel Stone <daniel@fooishbar.org>
This commit is contained in:
parent
0af79b124e
commit
9805cedf7b
23 changed files with 321 additions and 319 deletions
|
|
@ -240,7 +240,6 @@ static void
|
|||
SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
|
||||
{
|
||||
XF86VidModeScreenPrivatePtr pPriv;
|
||||
XF86VidModeEventPtr pEv;
|
||||
unsigned long mask;
|
||||
xXF86VidModeNotifyEvent ev;
|
||||
int kind;
|
||||
|
|
@ -253,15 +252,17 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced)
|
|||
return;
|
||||
kind = XF86VidModeModeChange;
|
||||
for (pEv = pPriv->events; pEv; pEv = pEv->next) {
|
||||
if (!(pEv->mask & mask))
|
||||
continue;
|
||||
ev.type = XF86VidModeNotify + XF86VidModeEventBase;
|
||||
ev.state = state;
|
||||
ev.timestamp = currentTime.milliseconds;
|
||||
ev.root = pScreen->root->drawable.id;
|
||||
ev.kind = kind;
|
||||
ev.forced = forced;
|
||||
WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
|
||||
if (pEv->mask & mask) {
|
||||
XF86VidModeEventPtr pEv = {
|
||||
.type = XF86VidModeNotify + XF86VidModeEventBase,
|
||||
.state = state,
|
||||
.timestamp = currentTime.milliseconds,
|
||||
.root = pScreen->root->drawable.id,
|
||||
.kind = kind,
|
||||
.forced = forced
|
||||
};
|
||||
WriteEventsToClient(pEv->client, 1, (xEvent *) &ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue