xserver/Xext/shape/byteswap.c
Enrico Weigelt, metux IT consult 4fb08174d7 Xext: shape: 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-15 17:57:49 +02:00

28 lines
631 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/shapeproto.h>
#include "include/misc.h"
#include "shape_intern.h"
void ShapeSwapNotifyEvent(xEvent *_from, xEvent *_to)
{
xShapeNotifyEvent *from = (xShapeNotifyEvent*)_from;
xShapeNotifyEvent *to = (xShapeNotifyEvent*)_to;
*to = *from;
swapl(&to->window);
swaps(&to->sequenceNumber);
swaps(&to->x);
swaps(&to->y);
swaps(&to->width);
swaps(&to->height);
swapl(&to->time);
}