xserver/Xext/saver/byteswap.c
Enrico Weigelt, metux IT consult c255120ee8 Xext: saver: fix mismatching event swap prototypes
Instead of hard typecasts on event proc assignment, better accept the
expected parameter types and do the typecast inside the functions.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2026-10-17 19:37:55 +02:00

24 lines
602 B
C

/* SPDX-License-Identifier: X11 OR MIT OR AGPL-3.0-or-later
*
* Copyright © 2026 Enrico Weigelt, metux IT consult <info@metux.net>
*/
#include <dix-config.h>
#include <X11/Xproto.h>
#include <X11/extensions/saverproto.h>
#include "include/misc.h"
#include "saver_intern.h"
void ScreenSaverSwapNotifyEvent(xEvent *_from, xEvent *_to)
{
xScreenSaverNotifyEvent *from = (xScreenSaverNotifyEvent*)_from;
xScreenSaverNotifyEvent *to = (xScreenSaverNotifyEvent*)_to;
*to = *from;
swaps(&to->sequenceNumber);
swapl(&to->timestamp);
swapl(&to->root);
swapl(&to->window);
}