dix: unexport and rename CreateWindow()
a) an internal function that's not used by any drivers b) conflicting with function/define of same name on win32 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
parent
9903f2bf40
commit
4ac10378e1
11
Xext/saver.c
11
Xext/saver.c
|
@ -36,6 +36,7 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
#include "dix/colormap_priv.h"
|
#include "dix/colormap_priv.h"
|
||||||
#include "dix/cursor_priv.h"
|
#include "dix/cursor_priv.h"
|
||||||
#include "dix/dix_priv.h"
|
#include "dix/dix_priv.h"
|
||||||
|
#include "dix/window_priv.h"
|
||||||
#include "os/osdep.h"
|
#include "os/osdep.h"
|
||||||
#include "os/screensaver.h"
|
#include "os/screensaver.h"
|
||||||
|
|
||||||
|
@ -63,10 +64,6 @@ in this Software without prior written authorization from the X Consortium.
|
||||||
#include "protocol-versions.h"
|
#include "protocol-versions.h"
|
||||||
#include "extinit_priv.h"
|
#include "extinit_priv.h"
|
||||||
|
|
||||||
// temporary workaround for win32/mingw32 name clash
|
|
||||||
// see: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1355
|
|
||||||
#undef CreateWindow
|
|
||||||
|
|
||||||
Bool noScreenSaverExtension = FALSE;
|
Bool noScreenSaverExtension = FALSE;
|
||||||
|
|
||||||
static int ScreenSaverEventBase = 0;
|
static int ScreenSaverEventBase = 0;
|
||||||
|
@ -476,7 +473,7 @@ CreateSaverWindow(ScreenPtr pScreen)
|
||||||
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
if (GrabInProgress && GrabInProgress != pAttr->client->index)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pWin = CreateWindow(pSaver->wid, pScreen->root,
|
pWin = dixCreateWindow(pSaver->wid, pScreen->root,
|
||||||
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
pAttr->x, pAttr->y, pAttr->width, pAttr->height,
|
||||||
pAttr->borderWidth, pAttr->class,
|
pAttr->borderWidth, pAttr->class,
|
||||||
pAttr->mask, (XID *) pAttr->values,
|
pAttr->mask, (XID *) pAttr->values,
|
||||||
|
@ -757,7 +754,7 @@ ScreenSaverSetAttributes(ClientPtr client, xScreenSaverSetAttributesReq *stuff)
|
||||||
depth = stuff->depth;
|
depth = stuff->depth;
|
||||||
visual = stuff->visualID;
|
visual = stuff->visualID;
|
||||||
|
|
||||||
/* copied directly from CreateWindow */
|
/* copied directly from dixCreateWindow */
|
||||||
|
|
||||||
if (class == CopyFromParent)
|
if (class == CopyFromParent)
|
||||||
class = pParent->drawable.class;
|
class = pParent->drawable.class;
|
||||||
|
@ -810,7 +807,7 @@ ScreenSaverSetAttributes(ClientPtr client, xScreenSaverSetAttributesReq *stuff)
|
||||||
return BadMatch;
|
return BadMatch;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* end of errors from CreateWindow */
|
/* end of errors from dixCreateWindow */
|
||||||
|
|
||||||
pPriv = GetScreenPrivate(pScreen);
|
pPriv = GetScreenPrivate(pScreen);
|
||||||
if (pPriv && pPriv->attr) {
|
if (pPriv && pPriv->attr) {
|
||||||
|
|
|
@ -43,6 +43,8 @@
|
||||||
|
|
||||||
#include <dix-config.h>
|
#include <dix-config.h>
|
||||||
|
|
||||||
|
#include "dix/window_priv.h"
|
||||||
|
|
||||||
#include "compint.h"
|
#include "compint.h"
|
||||||
#include "xace.h"
|
#include "xace.h"
|
||||||
|
|
||||||
|
@ -141,7 +143,7 @@ compCreateOverlayWindow(ScreenPtr pScreen)
|
||||||
#endif /* XINERAMA */
|
#endif /* XINERAMA */
|
||||||
|
|
||||||
pWin = cs->pOverlayWin =
|
pWin = cs->pOverlayWin =
|
||||||
CreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0,
|
dixCreateWindow(cs->overlayWid, pRoot, x, y, w, h, 0,
|
||||||
InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0],
|
InputOutput, CWBackPixmap | CWOverrideRedirect, &attrs[0],
|
||||||
pRoot->drawable.depth,
|
pRoot->drawable.depth,
|
||||||
serverClient, pScreen->rootVisual, &result);
|
serverClient, pScreen->rootVisual, &result);
|
||||||
|
|
|
@ -111,6 +111,7 @@ Equipment Corporation.
|
||||||
#include "dix/registry_priv.h"
|
#include "dix/registry_priv.h"
|
||||||
#include "dix/resource_priv.h"
|
#include "dix/resource_priv.h"
|
||||||
#include "dix/screenint_priv.h"
|
#include "dix/screenint_priv.h"
|
||||||
|
#include "dix/window_priv.h"
|
||||||
#include "include/resource.h"
|
#include "include/resource.h"
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
@ -138,9 +139,6 @@ Equipment Corporation.
|
||||||
#include "xfixesint.h"
|
#include "xfixesint.h"
|
||||||
#include "dixstruct_priv.h"
|
#include "dixstruct_priv.h"
|
||||||
|
|
||||||
// temporary workaround for win32/mingw32 name clash
|
|
||||||
#undef CreateWindow
|
|
||||||
|
|
||||||
#ifdef XSERVER_DTRACE
|
#ifdef XSERVER_DTRACE
|
||||||
#include "probes.h"
|
#include "probes.h"
|
||||||
#endif
|
#endif
|
||||||
|
@ -751,7 +749,7 @@ ProcCreateWindow(ClientPtr client)
|
||||||
client->errorValue = 0;
|
client->errorValue = 0;
|
||||||
return BadValue;
|
return BadValue;
|
||||||
}
|
}
|
||||||
pWin = CreateWindow(stuff->wid, pParent, stuff->x,
|
pWin = dixCreateWindow(stuff->wid, pParent, stuff->x,
|
||||||
stuff->y, stuff->width, stuff->height,
|
stuff->y, stuff->width, stuff->height,
|
||||||
stuff->borderWidth, stuff->class,
|
stuff->borderWidth, stuff->class,
|
||||||
stuff->mask, (XID *) &stuff[1],
|
stuff->mask, (XID *) &stuff[1],
|
||||||
|
|
12
dix/window.c
12
dix/window.c
|
@ -106,6 +106,7 @@ Equipment Corporation.
|
||||||
#include "dix/input_priv.h"
|
#include "dix/input_priv.h"
|
||||||
#include "dix/property_priv.h"
|
#include "dix/property_priv.h"
|
||||||
#include "dix/resource_priv.h"
|
#include "dix/resource_priv.h"
|
||||||
|
#include "dix/window_priv.h"
|
||||||
#include "mi/mi_priv.h" /* miPaintWindow */
|
#include "mi/mi_priv.h" /* miPaintWindow */
|
||||||
#include "os/auth.h"
|
#include "os/auth.h"
|
||||||
#include "os/client_priv.h"
|
#include "os/client_priv.h"
|
||||||
|
@ -142,7 +143,7 @@ Equipment Corporation.
|
||||||
/******
|
/******
|
||||||
* Window stuff for server
|
* Window stuff for server
|
||||||
*
|
*
|
||||||
* CreateRootWindow, CreateWindow, ChangeWindowAttributes,
|
* CreateRootWindow, dixCreateWindow, ChangeWindowAttributes,
|
||||||
* GetWindowAttributes, DeleteWindow, DestroySubWindows,
|
* GetWindowAttributes, DeleteWindow, DestroySubWindows,
|
||||||
* HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows,
|
* HandleSaveSet, ReparentWindow, MapWindow, MapSubWindows,
|
||||||
* UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow,
|
* UnmapWindow, UnmapSubWindows, ConfigureWindow, CirculateWindow,
|
||||||
|
@ -741,13 +742,8 @@ RealChildHead(WindowPtr pWin)
|
||||||
return NullWindow;
|
return NullWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*****
|
|
||||||
* CreateWindow
|
|
||||||
* Makes a window in response to client request
|
|
||||||
*****/
|
|
||||||
|
|
||||||
WindowPtr
|
WindowPtr
|
||||||
CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
dixCreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w,
|
||||||
unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist,
|
unsigned h, unsigned bw, unsigned class, Mask vmask, XID *vlist,
|
||||||
int depth, ClientPtr client, VisualID visual, int *error)
|
int depth, ClientPtr client, VisualID visual, int *error)
|
||||||
{
|
{
|
||||||
|
@ -3277,7 +3273,7 @@ TileScreenSaver(ScreenPtr pScreen, int kind)
|
||||||
}
|
}
|
||||||
|
|
||||||
pWin = pScreen->screensaver.pWindow =
|
pWin = pScreen->screensaver.pWindow =
|
||||||
CreateWindow(pScreen->screensaver.wid,
|
dixCreateWindow(pScreen->screensaver.wid,
|
||||||
pScreen->root,
|
pScreen->root,
|
||||||
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
-RANDOM_WIDTH, -RANDOM_WIDTH,
|
||||||
(unsigned short) pScreen->width + RANDOM_WIDTH,
|
(unsigned short) pScreen->width + RANDOM_WIDTH,
|
||||||
|
|
|
@ -0,0 +1,35 @@
|
||||||
|
/* SPDX-License-Identifier: MIT OR X11
|
||||||
|
*
|
||||||
|
* Copyright © 2025 Enrico Weigelt, metux IT consult <info@metux.net>
|
||||||
|
*/
|
||||||
|
#ifndef _XSERVER_DIX_WINDOW_H
|
||||||
|
#define _XSERVER_DIX_WINDOW_H
|
||||||
|
|
||||||
|
#include <X11/X.h>
|
||||||
|
|
||||||
|
#include "include/dix.h"
|
||||||
|
#include "include/window.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* @brief create a window
|
||||||
|
*
|
||||||
|
* Creates a window with given XID, geometry, etc
|
||||||
|
*
|
||||||
|
* @return pointer to new Window or NULL on error (see error pointer)
|
||||||
|
*/
|
||||||
|
WindowPtr dixCreateWindow(Window wid,
|
||||||
|
WindowPtr pParent,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
unsigned int w,
|
||||||
|
unsigned int h,
|
||||||
|
unsigned int bw,
|
||||||
|
unsigned int windowclass,
|
||||||
|
Mask vmask,
|
||||||
|
XID * vlist,
|
||||||
|
int depth,
|
||||||
|
ClientPtr client,
|
||||||
|
VisualID visual,
|
||||||
|
int * error);
|
||||||
|
|
||||||
|
#endif /* _XSERVER_DIX_WINDOW_H */
|
|
@ -47,6 +47,4 @@
|
||||||
#include "ddraw.h"
|
#include "ddraw.h"
|
||||||
#pragma pop_macro("Status")
|
#pragma pop_macro("Status")
|
||||||
|
|
||||||
#undef CreateWindow
|
|
||||||
|
|
||||||
#endif /* _WINMS_H_ */
|
#endif /* _WINMS_H_ */
|
||||||
|
|
|
@ -99,21 +99,6 @@ extern _X_EXPORT void RegisterRealChildHeadProc(RealChildHeadProc proc);
|
||||||
|
|
||||||
extern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ );
|
extern _X_EXPORT WindowPtr RealChildHead(WindowPtr /*pWin */ );
|
||||||
|
|
||||||
extern _X_EXPORT WindowPtr CreateWindow(Window /*wid */ ,
|
|
||||||
WindowPtr /*pParent */ ,
|
|
||||||
int /*x */ ,
|
|
||||||
int /*y */ ,
|
|
||||||
unsigned int /*w */ ,
|
|
||||||
unsigned int /*h */ ,
|
|
||||||
unsigned int /*bw */ ,
|
|
||||||
unsigned int /*class */ ,
|
|
||||||
Mask /*vmask */ ,
|
|
||||||
XID * /*vlist */ ,
|
|
||||||
int /*depth */ ,
|
|
||||||
ClientPtr /*client */ ,
|
|
||||||
VisualID /*visual */ ,
|
|
||||||
int * /*error */ );
|
|
||||||
|
|
||||||
extern _X_EXPORT int DeleteWindow(void *pWin,
|
extern _X_EXPORT int DeleteWindow(void *pWin,
|
||||||
XID wid);
|
XID wid);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue