Xext: damage: DamageExtSetCritical() replace Bool by bool

Prefer C standard stdbool over Xlib's own type.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2026-01-19 11:59:45 +01:00
committed by Enrico Weigelt
parent 30fb629a7d
commit 080413fe1f
6 changed files with 48 additions and 41 deletions

View File

@@ -32,11 +32,11 @@
#include "include/pixmapstr.h"
#include "miext/extinit_priv.h"
#include "os/client_priv.h"
#include "Xext/damage/damageext_priv.h"
#include "Xext/panoramiX.h"
#include "Xext/panoramiXsrv.h"
#include "xfixes/xfixes.h"
#include "damageextint.h"
#include "damagestr.h"
#include "protocol-versions.h"
#include "dixstruct_priv.h"
@@ -201,7 +201,7 @@ DamageExtDestroy(DamagePtr pDamage, void *closure)
}
void
DamageExtSetCritical(ClientPtr pClient, Bool critical)
DamageExtSetCritical(ClientPtr pClient, bool critical)
{
DamageClientPtr pDamageClient = GetDamageClient(pClient);

View File

@@ -0,0 +1,40 @@
/* SPDX-License-Identifier: MIT OR X11
*
* @copyright Enrico Weigelt, metux IT consult <info@metux.net>
*
* Entry points for the generic damage extension.
* (not part of SDK, not available to external modules).
*/
#ifndef __XLIBRE_XEXT_DAMAGEEXT_PRIV_H
#define __XLIBRE_XEXT_DAMAGEEXT_PRIV_H
#include <stdbool.h>
#include "include/dix.h"
/*
* Tell damage extension that upcoming damage events for given clients
* are critical output (thus need to be sent out fast) - or reverse it.
*
* Internally maintains a counter that's either increased or decreased
* by each call of this function. If the counter is above zero, events
* are sent as critical output.
*
* @param pClient pointer to the affected client
* @param critical "true" - increase the counter, otherwise decrease it.
*/
void DamageExtSetCritical(ClientPtr pClient, bool critical);
/*
* Initialize PanoramiX specific data structures for the damage extension.
* Only called by PanoramiX extension, when it's initialized and ready run.
*/
void PanoramiXDamageInit(void);
/*
* Reset/De-Init PanoramiX specific data strucures for the damage extension.
* Only called by PanoramiX extension, right before it's shutting down.
*/
void PanoramiXDamageReset(void);
#endif /* __XLIBRE_XEXT_DAMAGEEXT_PRIV_H */

View File

@@ -1,35 +0,0 @@
/*
* Copyright © 2002 Keith Packard
*
* Permission to use, copy, modify, distribute, and sell this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the name of Keith Packard not be used in
* advertising or publicity pertaining to distribution of the software without
* specific, written prior permission. Keith Packard makes no
* representations about the suitability of this software for any purpose. It
* is provided "as is" without express or implied warranty.
*
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef _DAMAGEEXTINT_H_
#define _DAMAGEEXTINT_H_
#include <X11/X.h>
#include "include/dix.h"
void
DamageExtSetCritical(ClientPtr pClient, Bool critical);
void PanoramiXDamageInit(void);
void PanoramiXDamageReset(void);
#endif /* _DAMAGEEXTINT_H_ */

View File

@@ -40,6 +40,7 @@ Equipment Corporation.
#include "dix/server_priv.h"
#include "miext/extinit_priv.h"
#include "os/osdep.h"
#include "Xext/damage/damageext_priv.h"
#include "Xext/panoramiX.h"
#include "Xext/panoramiXsrv.h"
@@ -59,7 +60,6 @@ Equipment Corporation.
#include "resource.h"
#include "picturestr_priv.h"
#include "xfixesint.h"
#include "Xext/damage/damageextint.h"
#include "compint.h"
#include "protocol-versions.h"

View File

@@ -43,8 +43,11 @@
#include <dix-config.h>
#include <stdbool.h>
#include "dix/resource_priv.h"
#include "os/bug_priv.h"
#include "Xext/damage/damageext_priv.h"
#include "compint.h"
@@ -408,7 +411,7 @@ compRedirectSubwindows(ClientPtr pClient, WindowPtr pWin, int update)
* tell damage extension that damage events for this client are
* critical output
*/
DamageExtSetCritical(pClient, TRUE);
DamageExtSetCritical(pClient, true);
pWin->inhibitBGPaint = TRUE;
}
return Success;
@@ -436,7 +439,7 @@ compFreeClientSubwindows(WindowPtr pWin, XID id)
* tell damage extension that damage events for this client are
* critical output
*/
DamageExtSetCritical(pClient, FALSE);
DamageExtSetCritical(pClient, false);
csw->update = CompositeRedirectAutomatic;
pWin->inhibitBGPaint = FALSE;
if (pWin->mapped)

View File

@@ -63,7 +63,6 @@
#include "privates.h"
#include "mi.h"
#include "damage.h"
#include "Xext/damage/damageextint.h"
#include "xfixes.h"
#include <X11/extensions/compositeproto.h>
#include "compositeext.h"