mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-14 05:14:45 +00:00
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>
32 lines
1 KiB
C
32 lines
1 KiB
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 <stdbool.h>
|
|
#include <X11/Xproto.h>
|
|
#include <X11/extensions/damageproto.h>
|
|
|
|
#include "include/misc.h"
|
|
|
|
#include "damageext_intern.h"
|
|
|
|
void DamageSwapNotifyEvent(xEvent *_from, xEvent *_to)
|
|
{
|
|
xDamageNotifyEvent *from = (xDamageNotifyEvent*)_from;
|
|
xDamageNotifyEvent *to = (xDamageNotifyEvent*)_to;
|
|
|
|
to->type = from->type;
|
|
cpswaps(from->sequenceNumber, to->sequenceNumber);
|
|
cpswapl(from->drawable, to->drawable);
|
|
cpswapl(from->damage, to->damage);
|
|
cpswaps(from->area.x, to->area.x);
|
|
cpswaps(from->area.y, to->area.y);
|
|
cpswaps(from->area.width, to->area.width);
|
|
cpswaps(from->area.height, to->area.height);
|
|
cpswaps(from->geometry.x, to->geometry.x);
|
|
cpswaps(from->geometry.y, to->geometry.y);
|
|
cpswaps(from->geometry.width, to->geometry.width);
|
|
cpswaps(from->geometry.height, to->geometry.height);
|
|
}
|