From b07202abc76c8a0d3a83d4643e7b0bda5a6d2f8c Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:33:38 +0100 Subject: [PATCH 01/40] Revert "mi: unexport SetInstalledmiColormap() macro" This reverts commit aae9bd3f62ef88f5925c2270c7400314c6c40a6b. --- hw/xfree86/common/xf86cmap.c | 4 +--- mi/mi_priv.h | 3 --- mi/micmap.c | 2 -- mi/micmap.h | 2 ++ 4 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hw/xfree86/common/xf86cmap.c b/hw/xfree86/common/xf86cmap.c index 84f6a495d..ca547cc33 100644 --- a/hw/xfree86/common/xf86cmap.c +++ b/hw/xfree86/common/xf86cmap.c @@ -36,11 +36,9 @@ #include "misc.h" #include "dix/colormap_priv.h" -#include "mi/mi_priv.h" - -#include "misc.h" #include "colormapst.h" #include "scrnintstr.h" + #include "resource.h" #include "xf86.h" diff --git a/mi/mi_priv.h b/mi/mi_priv.h index a9360c9b3..281e2e376 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -19,9 +19,6 @@ #include "include/window.h" #include "mi/mi.h" -#define SetInstalledmiColormap(s,c) \ - (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c)) - void miScreenClose(ScreenPtr pScreen); void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); diff --git a/mi/micmap.c b/mi/micmap.c index e8b3ad568..8c132335c 100644 --- a/mi/micmap.c +++ b/mi/micmap.c @@ -33,8 +33,6 @@ #include #include "dix/colormap_priv.h" -#include "mi/mi_priv.h" -#include "os/osdep.h" #include "scrnintstr.h" #include "colormapst.h" diff --git a/mi/micmap.h b/mi/micmap.h index d8bf7e2c2..bb71c7cb1 100644 --- a/mi/micmap.h +++ b/mi/micmap.h @@ -6,6 +6,8 @@ #define GetInstalledmiColormap(s) \ ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey)) +#define SetInstalledmiColormap(s,c) \ + (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c)) extern _X_EXPORT DevPrivateKeyRec micmapScrPrivateKeyRec; From c72b0add9b5d830b91f431bb05fa9036b0bb0e2d Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:45 +0100 Subject: [PATCH 02/40] Revert "mi: unexport miXYToWindow()" This reverts commit 3cf24082329131c330586f7582f37753d1d2adf1. --- mi/mi.h | 4 ++++ mi/mi_priv.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 3a65f4cb1..d9e328e9e 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -284,6 +284,10 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, int npt, DDXPointPtr pPts); +/* miwindow.c */ + +extern _X_EXPORT WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); + /* mizerarc.c */ extern _X_EXPORT void miZeroPolyArc(DrawablePtr /*pDraw */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 281e2e376..a158ccb4a 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -67,6 +67,5 @@ void miSetShape(WindowPtr pWin, int kind); void miChangeBorderWidth(WindowPtr pWin, unsigned int width); void miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure); WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); -WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); #endif /* _XSERVER_MI_PRIV_H */ From 876c053d5232d22ef9b91abc12c7d66e1cb26a1e Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:46 +0100 Subject: [PATCH 03/40] Revert "mi: unexport miSpriteTrace()" This reverts commit 85be6c82b0431731be261e04457a11b74a46fb4a. --- mi/mi.h | 2 ++ mi/mi_priv.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index d9e328e9e..af6fdea3e 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,8 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); + extern _X_EXPORT WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); /* mizerarc.c */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index a158ccb4a..3d466f9c7 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -66,6 +66,5 @@ WindowPtr miGetLayerWindow(WindowPtr pWin); void miSetShape(WindowPtr pWin, int kind); void miChangeBorderWidth(WindowPtr pWin, unsigned int width); void miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure); -WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); #endif /* _XSERVER_MI_PRIV_H */ From 0ff86542211d4928a7d5800ad4391c7a9c89eec7 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:47 +0100 Subject: [PATCH 04/40] Revert "mi: unexport miMarkUnrealizedWindow()" This reverts commit 6c3b43205302ea4c9c5908ba93cb335af78674aa. --- mi/mi.h | 5 +++++ mi/mi_priv.h | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index af6fdea3e..1b47297ba 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,11 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miMarkUnrealizedWindow(WindowPtr /*pChild */ , + WindowPtr /*pWin */ , + Bool /*fromConfigure */ + ); + extern _X_EXPORT WindowPtr miSpriteTrace(SpritePtr pSprite, int x, int y); extern _X_EXPORT WindowPtr miXYToWindow(ScreenPtr pScreen, SpritePtr pSprite, int x, int y); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 3d466f9c7..9c56cf3cb 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -65,6 +65,5 @@ void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, WindowPtr miGetLayerWindow(WindowPtr pWin); void miSetShape(WindowPtr pWin, int kind); void miChangeBorderWidth(WindowPtr pWin, unsigned int width); -void miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure); #endif /* _XSERVER_MI_PRIV_H */ From a06fac4ac22c002812eb97e422b8747a0705f318 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:48 +0100 Subject: [PATCH 05/40] Revert "mi: unexport miChangeBorderWidth()" This reverts commit b23ecec2f431a4c2cf1c8442625b772f1160f412. --- mi/mi.h | 4 ++++ mi/mi_priv.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 1b47297ba..36bf8c8ce 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,10 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miChangeBorderWidth(WindowPtr /*pWin */ , + unsigned int /*width */ + ); + extern _X_EXPORT void miMarkUnrealizedWindow(WindowPtr /*pChild */ , WindowPtr /*pWin */ , Bool /*fromConfigure */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 9c56cf3cb..7f1d65eaf 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -64,6 +64,5 @@ void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); WindowPtr miGetLayerWindow(WindowPtr pWin); void miSetShape(WindowPtr pWin, int kind); -void miChangeBorderWidth(WindowPtr pWin, unsigned int width); #endif /* _XSERVER_MI_PRIV_H */ From 9e0151e64aee4a11616c4e7aa4d57d0ca7f32c21 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:48 +0100 Subject: [PATCH 06/40] Revert "mi: unexport miSetShape()" This reverts commit 597ba690d3eabf127297504d18dc2b6c0ede7eee. --- mi/mi.h | 4 ++++ mi/mi_priv.h | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 36bf8c8ce..89fdf9b49 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,10 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miSetShape(WindowPtr /*pWin */ , + int /*kind */ + ); + extern _X_EXPORT void miChangeBorderWidth(WindowPtr /*pWin */ , unsigned int /*width */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 7f1d65eaf..10df29643 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -63,6 +63,5 @@ void miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); WindowPtr miGetLayerWindow(WindowPtr pWin); -void miSetShape(WindowPtr pWin, int kind); #endif /* _XSERVER_MI_PRIV_H */ From cd0908b1bbe99c42f55e2aae466c371496543e2b Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:49 +0100 Subject: [PATCH 07/40] Revert "mi: unexport miGetLayerWindow()" This reverts commit f11e2032151d26707374fbf2453d5c39e61b1d4c. --- mi/mi.h | 3 +++ mi/mi_priv.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 89fdf9b49..29b9d8424 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,9 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */ + ); + extern _X_EXPORT void miSetShape(WindowPtr /*pWin */ , int /*kind */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 10df29643..690a9e836 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -62,6 +62,5 @@ void miHandleValidateExposures(WindowPtr pWin); void miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind); void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, unsigned int h, WindowPtr pSib); -WindowPtr miGetLayerWindow(WindowPtr pWin); #endif /* _XSERVER_MI_PRIV_H */ From d775d4c22e816e432f06c8d8354c9ff6fa5ffd86 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:49 +0100 Subject: [PATCH 08/40] Revert "mi: unexport miResizeWindow()" This reverts commit 14565a4561625b94ff5fe3b2531b76a7175e6334. --- mi/mi.h | 8 ++++++++ mi/mi_priv.h | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 29b9d8424..44968bb4b 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,14 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ , + int /*x */ , + int /*y */ , + unsigned int /*w */ , + unsigned int /*h */ , + WindowPtr /*pSib */ + ); + extern _X_EXPORT WindowPtr miGetLayerWindow(WindowPtr /*pWin */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 690a9e836..8e58ac68f 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -60,7 +60,5 @@ Bool miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin); void miHandleValidateExposures(WindowPtr pWin); void miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind); -void miResizeWindow(WindowPtr pWin, int x, int y, unsigned int w, - unsigned int h, WindowPtr pSib); #endif /* _XSERVER_MI_PRIV_H */ From b301b5f212a5af1fb1052e12f45c3a9461067e88 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:50 +0100 Subject: [PATCH 09/40] Revert "mi: unexport miMoveWindow()" This reverts commit faad8ed1c6dff23da9935bbfcea8e5805c4df86e. --- mi/mi.h | 7 +++++++ mi/mi_priv.h | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 44968bb4b..c705c36d9 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,13 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ , + int /*x */ , + int /*y */ , + WindowPtr /*pNextSib */ , + VTKind /*kind */ + ); + extern _X_EXPORT void miResizeWindow(WindowPtr /*pWin */ , int /*x */ , int /*y */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 8e58ac68f..91a88a310 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -15,7 +15,6 @@ #include "include/pixmap.h" #include "include/regionstr.h" #include "include/screenint.h" -#include "include/validate.h" #include "include/window.h" #include "mi/mi.h" @@ -59,6 +58,5 @@ void miMarkWindow(WindowPtr pWin); Bool miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin); void miHandleValidateExposures(WindowPtr pWin); -void miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind); #endif /* _XSERVER_MI_PRIV_H */ From 390d17fd49b1fe313f921dd850eedee503f2f806 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:50 +0100 Subject: [PATCH 10/40] Revert "mi: unexport miHandleValidateExposures()" This reverts commit 0624a8bad4cb092ba98354b1f6f6af9c04aedadf. --- mi/mi.h | 3 +++ mi/mi_priv.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index c705c36d9..878c25b18 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,9 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miHandleValidateExposures(WindowPtr /*pWin */ + ); + extern _X_EXPORT void miMoveWindow(WindowPtr /*pWin */ , int /*x */ , int /*y */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 91a88a310..ca1fb5f87 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -57,6 +57,5 @@ void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, void miMarkWindow(WindowPtr pWin); Bool miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin); -void miHandleValidateExposures(WindowPtr pWin); #endif /* _XSERVER_MI_PRIV_H */ From b8b84c6090a428674632f6ec907b59225e825d72 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:34:50 +0100 Subject: [PATCH 11/40] Revert "mi: unexport miMarkOverlappedWindows()" This reverts commit ade6650a8148f322a38e34f58fbf22523957c718. --- mi/mi.h | 5 +++++ mi/mi_priv.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 878c25b18..dc34e6fda 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,11 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT Bool miMarkOverlappedWindows(WindowPtr /*pWin */ , + WindowPtr /*pFirst */ , + WindowPtr * /*ppLayerWin */ + ); + extern _X_EXPORT void miHandleValidateExposures(WindowPtr /*pWin */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index ca1fb5f87..5f8e727d9 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -55,7 +55,5 @@ int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures); void miMarkWindow(WindowPtr pWin); -Bool miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, - WindowPtr *ppLayerWin); #endif /* _XSERVER_MI_PRIV_H */ From 1855037ac48c64b7c6247a2f1c325b56539e369e Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:35:09 +0100 Subject: [PATCH 12/40] Revert "mi: unexport miMarkWindow()" This reverts commit bcbb6eec62390f793d6feb6ab5c28b2595e46a81. --- mi/mi.h | 3 +++ mi/mi_priv.h | 1 - mi/mioverlay.c | 4 +--- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index dc34e6fda..ae33299d0 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,9 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miMarkWindow(WindowPtr /*pWin */ + ); + extern _X_EXPORT Bool miMarkOverlappedWindows(WindowPtr /*pWin */ , WindowPtr /*pFirst */ , WindowPtr * /*ppLayerWin */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 5f8e727d9..c2c94aefc 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -54,6 +54,5 @@ int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, Bool generateExposures); -void miMarkWindow(WindowPtr pWin); #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/mioverlay.c b/mi/mioverlay.c index 3b8edee1b..6a03c1184 100644 --- a/mi/mioverlay.c +++ b/mi/mioverlay.c @@ -3,13 +3,11 @@ #include -#include "mi/mi_priv.h" - - #include "scrnintstr.h" #include #include "validate.h" #include "windowstr.h" +#include "mi.h" #include "gcstruct.h" #include "regionstr.h" #include "privates.h" From f4ae013c8f46e5727bcff37f8731435f13b00dce Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:35:11 +0100 Subject: [PATCH 13/40] Revert "mi: unexport miClearToBackground()" This reverts commit 3856b6cb5ee3ba3116d36589006d173d8d5024bc. --- mi/mi.h | 8 ++++++++ mi/mi_priv.h | 3 --- mi/miwindow.c | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index ae33299d0..8708a3604 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -286,6 +286,14 @@ extern _X_EXPORT void miPolylines(DrawablePtr pDrawable, /* miwindow.c */ +extern _X_EXPORT void miClearToBackground(WindowPtr /*pWin */ , + int /*x */ , + int /*y */ , + int /*w */ , + int /*h */ , + Bool /*generateExposures */ + ); + extern _X_EXPORT void miMarkWindow(WindowPtr /*pWin */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index c2c94aefc..a4e09fea8 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -52,7 +52,4 @@ int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y); int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); -void miClearToBackground(WindowPtr pWin, int x, int y, int w, int h, - Bool generateExposures); - #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/miwindow.c b/mi/miwindow.c index 4412b9c18..b30e624c7 100644 --- a/mi/miwindow.c +++ b/mi/miwindow.c @@ -50,10 +50,10 @@ SOFTWARE. #include #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "regionstr.h" #include "region.h" +#include "mi.h" #include "windowstr.h" #include "scrnintstr.h" #include "pixmapstr.h" From b29d022512b2e23131f0a2e5e5ae83b7df282f08 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:35:12 +0100 Subject: [PATCH 14/40] Revert "mi: unexport miValidateTree()" This reverts commit 7e21a514d7f88da511800297fe908e2d54991d9c. --- mi/mi.h | 5 +++++ mi/mi_priv.h | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 8708a3604..101dfe468 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -264,6 +264,11 @@ extern _X_EXPORT Bool miScreenInit(ScreenPtr pScreen, /* mivaltree.c */ +extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ , + WindowPtr /*pChild */ , + VTKind /*kind */ + ); + extern _X_EXPORT void miWideLine(DrawablePtr /*pDrawable */ , GCPtr /*pGC */ , int /*mode */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index a4e09fea8..5722a7cbf 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -50,6 +50,5 @@ void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode); int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y); -int miValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind); #endif /* _XSERVER_MI_PRIV_H */ From a7b98cf156be8ec75b1ccd75b82dadaf5041155b Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:36:00 +0100 Subject: [PATCH 15/40] Revert "mi: unexport miShapedWindowIn()" This reverts commit c2ee74c5236e0b578f91ac713f837d520b13603e. --- mi/mi.h | 7 +++++++ mi/mi_priv.h | 3 --- mi/mivaltree.c | 4 +--- miext/rootless/rootlessValTree.c | 6 ++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 101dfe468..7108f0432 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -264,6 +264,13 @@ extern _X_EXPORT Bool miScreenInit(ScreenPtr pScreen, /* mivaltree.c */ +extern _X_EXPORT int miShapedWindowIn(RegionPtr /*universe */ , + RegionPtr /*bounding */ , + BoxPtr /*rect */ , + int /*x */ , + int /*y */ + ); + extern _X_EXPORT int miValidateTree(WindowPtr /*pParent */ , WindowPtr /*pChild */ , VTKind /*kind */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 5722a7cbf..cb59a947b 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -48,7 +48,4 @@ void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what); void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, unsigned int subWindowMode); -int miShapedWindowIn(RegionPtr universe, RegionPtr bounding, BoxPtr rect, - int x, int y); - #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/mivaltree.c b/mi/mivaltree.c index edab5dc1b..0dff150c2 100644 --- a/mi/mivaltree.c +++ b/mi/mivaltree.c @@ -91,12 +91,10 @@ Equipment Corporation. #include #include - -#include "mi/mi_priv.h" - #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" +#include "mi.h" #include "regionstr.h" #include "mivalidate.h" #include "globals.h" diff --git a/miext/rootless/rootlessValTree.c b/miext/rootless/rootlessValTree.c index beacff99f..e311021db 100644 --- a/miext/rootless/rootlessValTree.c +++ b/miext/rootless/rootlessValTree.c @@ -92,13 +92,11 @@ Equipment Corporation. #include #include /* For NULL */ -#include - -#include "mi/mi_priv.h" - +#include #include "scrnintstr.h" #include "validate.h" #include "windowstr.h" +#include "mi.h" #include "regionstr.h" #include "mivalidate.h" From 34f73570759e0e93bf6999882c34633758763dfb Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:37:36 +0100 Subject: [PATCH 16/40] Revert "mi: unexport miSourceValidate()" This reverts commit 191cca09058a7b9ae64c3ab50fa64d499b9e6ec0. --- dix/pixmap.c | 6 ++---- hw/xfree86/modes/xf86Rotate.c | 2 +- mi/mi.h | 5 +++++ mi/mi_priv.h | 2 -- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dix/pixmap.c b/dix/pixmap.c index 020ceb83a..3324f947b 100644 --- a/dix/pixmap.c +++ b/dix/pixmap.c @@ -29,11 +29,8 @@ from The Open Group. #include #include -#include - -#include "mi/mi_priv.h" - #include "scrnintstr.h" +#include "mi.h" #include "misc.h" #include "os.h" #include "windowstr.h" @@ -41,6 +38,7 @@ from The Open Group. #include "dixstruct.h" #include "gcstruct.h" #include "servermd.h" +#include "X11/extensions/render.h" #include "picturestr.h" #include "randrstr.h" /* diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index da0aa7635..d94c77cdf 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -33,8 +33,8 @@ #include #include "dix/dix_priv.h" -#include "mi/mi_priv.h" +#include "mi.h" #include "xf86.h" #include "xf86DDC.h" #include "windowstr.h" diff --git a/mi/mi.h b/mi/mi.h index 7108f0432..70d83d95c 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -235,6 +235,11 @@ extern _X_EXPORT void miPushPixels(GCPtr /*pGC */ , ); /* miscrinit.c */ + +extern _X_EXPORT void +miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, + unsigned int subWindowMode); + extern _X_EXPORT Bool miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, diff --git a/mi/mi_priv.h b/mi/mi_priv.h index cb59a947b..e23c4ba88 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -46,6 +46,4 @@ void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy); void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what); -void miSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h, - unsigned int subWindowMode); #endif /* _XSERVER_MI_PRIV_H */ From b982c9514cc75314b79393bcd8cc89ef85da3cd6 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:03 +0100 Subject: [PATCH 17/40] Revert "mi: unexport miPaintWindow()" This reverts commit a54e8f5343bdab6c26832719479d094dd64554f9. --- dix/window.c | 2 +- mi/mi.h | 6 ++++++ mi/mi_priv.h | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/dix/window.c b/dix/window.c index e8ce20928..a613345b6 100644 --- a/dix/window.c +++ b/dix/window.c @@ -103,7 +103,6 @@ Equipment Corporation. #include "dix/exevents_priv.h" #include "dix/input_priv.h" #include "dix/property_priv.h" -#include "mi/mi_priv.h" /* miPaintWindow */ #include "os/auth.h" #include "os/client_priv.h" #include "os/screensaver.h" @@ -129,6 +128,7 @@ Equipment Corporation. #endif /* XINERAMA */ #include "dixevents.h" #include "globals.h" +#include "mi.h" /* miPaintWindow */ #ifdef COMPOSITE #include "compint.h" #endif diff --git a/mi/mi.h b/mi/mi.h index 70d83d95c..35c979fd6 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -127,9 +127,15 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*dsty */ ); + extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , RegionPtr /*prgn */); +extern _X_EXPORT void miPaintWindow(WindowPtr /*pWin */ , + RegionPtr /*prgn */ , + int /*what */ + ); + extern _X_EXPORT void miClearDrawable(DrawablePtr /*pDraw */ , GCPtr /*pGC */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index e23c4ba88..56b3e985b 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -44,6 +44,4 @@ void mieqSetHandler(int event, mieqHandler handler); void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy); -void miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what); - #endif /* _XSERVER_MI_PRIV_H */ From a080a088b86ffe11692f3fa33aa25504a6b94961 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:24 +0100 Subject: [PATCH 18/40] Revert "mi: unexport miWindowExposures()" This reverts commit e424f49cdb04ad343c72aed2457ed9b543fa8aea. --- fb/fboverlay.c | 2 -- hw/xnest/Window.c | 2 -- mi/mi.h | 1 - 3 files changed, 5 deletions(-) diff --git a/fb/fboverlay.c b/fb/fboverlay.c index 7ea8e660b..5ead17315 100644 --- a/fb/fboverlay.c +++ b/fb/fboverlay.c @@ -26,8 +26,6 @@ #include -#include "mi/mi_priv.h" - #include "fb.h" #include "fboverlay.h" #include "shmint.h" diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index d8a203a03..d7ad0097d 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -17,8 +17,6 @@ is" without express or implied warranty. #include #include -#include "mi/mi_priv.h" - #include "gcstruct.h" #include "window.h" #include "windowstr.h" diff --git a/mi/mi.h b/mi/mi.h index 35c979fd6..f2c925fe8 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -127,7 +127,6 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*dsty */ ); - extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , RegionPtr /*prgn */); From 06c8dbd7ff1b52094426f7d13945393fde1ba626 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:44 +0100 Subject: [PATCH 19/40] Revert "mi: unexport miSendExposures()" This reverts commit 8d07450904a087679005386e5b7aa055a3128d2b. --- mi/mi.h | 6 ++++++ mi/mi_priv.h | 4 ---- mi/miexpose.c | 6 ++++-- miext/rootless/rootlessScreen.c | 2 +- miext/rootless/rootlessWindow.c | 5 +---- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index f2c925fe8..aa7e7fa02 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -127,6 +127,12 @@ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , int /*dsty */ ); +extern _X_EXPORT void miSendExposures(WindowPtr /*pWin */ , + RegionPtr /*pRgn */ , + int /*dx */ , + int /*dy */ + ); + extern _X_EXPORT void miWindowExposures(WindowPtr /*pWin */ , RegionPtr /*prgn */); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 56b3e985b..43352b68c 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -13,9 +13,7 @@ #include "include/events.h" #include "include/gc.h" #include "include/pixmap.h" -#include "include/regionstr.h" #include "include/screenint.h" -#include "include/window.h" #include "mi/mi.h" void miScreenClose(ScreenPtr pScreen); @@ -42,6 +40,4 @@ typedef void (*mieqHandler) (int screen, InternalEvent *event, DeviceIntPtr dev); void mieqSetHandler(int event, mieqHandler handler); -void miSendExposures(WindowPtr pWin, RegionPtr pRgn, int dx, int dy); - #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/miexpose.c b/mi/miexpose.c index 4af84310c..6f834854a 100644 --- a/mi/miexpose.c +++ b/mi/miexpose.c @@ -74,12 +74,10 @@ Equipment Corporation. #include #include -#include #include #include #include "dix/dix_priv.h" -#include "mi/mi_priv.h" #include "misc.h" #include "regionstr.h" @@ -88,7 +86,11 @@ Equipment Corporation. #include "windowstr.h" #include "pixmap.h" #include "input.h" + #include "dixstruct.h" +#include "mi.h" +#include + #include "globals.h" #ifdef XINERAMA diff --git a/miext/rootless/rootlessScreen.c b/miext/rootless/rootlessScreen.c index ddb1cf607..b57018242 100644 --- a/miext/rootless/rootlessScreen.c +++ b/miext/rootless/rootlessScreen.c @@ -37,8 +37,8 @@ #include #include "dix/colormap_priv.h" -#include "mi/mi_priv.h" +#include "mi.h" #include "scrnintstr.h" #include "gcstruct.h" #include "pixmapstr.h" diff --git a/miext/rootless/rootlessWindow.c b/miext/rootless/rootlessWindow.c index f1cdec307..f089448ad 100644 --- a/miext/rootless/rootlessWindow.c +++ b/miext/rootless/rootlessWindow.c @@ -35,12 +35,9 @@ #include /* For CHAR_BIT */ #include #include - -#include "mi/mi_priv.h" -#include "dix_priv.h" - #ifdef __APPLE__ #include +#include "mi.h" #include "pixmapstr.h" #include "windowstr.h" //#include From 5425489d331853f762ade70be76631c70a4ebd22 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:45 +0100 Subject: [PATCH 20/40] Revert "mi: unexport mieqSetHandler()" This reverts commit 7748984e3ad355c5b23815f9baff717c75e62290. --- mi/mi.h | 9 +++++++++ mi/mi_priv.h | 9 --------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index aa7e7fa02..4132bc334 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,15 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +/** + * Custom input event handler. If you need to process input events in some + * other way than the default path, register an input event handler for the + * given internal event type. + */ +typedef void (*mieqHandler) (int screen, InternalEvent *event, + DeviceIntPtr dev); +void _X_EXPORT mieqSetHandler(int event, mieqHandler handler); + /* miexpose.c */ extern _X_EXPORT RegionPtr miHandleExposures(DrawablePtr /*pSrcDrawable */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 43352b68c..9da95f50c 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -31,13 +31,4 @@ void mieqProcessInputEvents(void); void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param); void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param); -/** - * Custom input event handler. If you need to process input events in some - * other way than the default path, register an input event handler for the - * given internal event type. - */ -typedef void (*mieqHandler) (int screen, InternalEvent *event, - DeviceIntPtr dev); -void mieqSetHandler(int event, mieqHandler handler); - #endif /* _XSERVER_MI_PRIV_H */ From 51e68e3951d06a33b6f077f059ce6f65c275001f Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:46 +0100 Subject: [PATCH 21/40] Revert "mi: unexport mieqRemoveCallbackOnDrained()" This reverts commit 964127ce10514056c37e5c79df60c7afc4050dc8. --- mi/mi.h | 3 +++ mi/mi_priv.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 4132bc334..4e01e9efe 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,9 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, + void *param); + /** * Custom input event handler. If you need to process input events in some * other way than the default path, register an input event handler for the diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 9da95f50c..2a2a8b617 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -29,6 +29,5 @@ void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_scr void mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen); void mieqProcessInputEvents(void); void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param); -void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param); #endif /* _XSERVER_MI_PRIV_H */ From 15fac1a1680f4814fd0e1bbd64ababfda81c8814 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:38:47 +0100 Subject: [PATCH 22/40] Revert "mi: unexport mieqAddCallbackOnDrained()" This reverts commit 269d54c48f7618f0e640045a3898dd406a6e5fa3. --- hw/xfree86/common/xf86Helper.c | 2 +- mi/mi.h | 3 +++ mi/mi_priv.h | 2 -- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 430482c38..564be38af 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -43,8 +43,8 @@ #include "dix/dix_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" +#include "mi.h" #include "os.h" #include "servermd.h" #include "pixmapstr.h" diff --git a/mi/mi.h b/mi/mi.h index 4e01e9efe..670b3e606 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,9 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqAddCallbackOnDrained(CallbackProcPtr callback, + void *param); + extern _X_EXPORT void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 2a2a8b617..fa6205131 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -9,7 +9,6 @@ #include #include "dix/screenint_priv.h" -#include "include/callback.h" #include "include/events.h" #include "include/gc.h" #include "include/pixmap.h" @@ -28,6 +27,5 @@ void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e); void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen); void mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen); void mieqProcessInputEvents(void); -void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param); #endif /* _XSERVER_MI_PRIV_H */ From fc562444bcff0d27212b2d05d399f263ac69f26a Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:39:24 +0100 Subject: [PATCH 23/40] Revert "mi: unexport mieqProcessInputEvents()" This reverts commit 9aa23b6abd7d30535ff037add8acaa5631e778d5. --- hw/xfree86/common/xf86Events.c | 8 +++++--- hw/xnest/Events.c | 3 +-- hw/xwin/winkeybd.c | 3 --- mi/mi.h | 3 +++ mi/mi_priv.h | 1 - 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 2a595b6e3..0ce862fc9 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -59,17 +59,17 @@ #include #include #include -#include + +#include "dix/input_priv.h" #include "dix/dix_priv.h" -#include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "misc.h" #include "xf86.h" #include "xf86Priv.h" #include "xf86_os_support.h" #include "xf86_OSlib.h" +#include #ifdef XFreeXDGA #include "dgaproc.h" @@ -78,7 +78,9 @@ #include "inputstr.h" #include "xf86Xinput.h" +#include "mi.h" #include "mipointer.h" + #include "xkbsrv.h" #include "xkbstr.h" diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 413206a2d..e58989d71 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -17,8 +17,6 @@ is" without express or implied warranty. #include #include -#include "mi/mi_priv.h" - #include "screenint.h" #include "input.h" #include "misc.h" @@ -27,6 +25,7 @@ is" without express or implied warranty. #include "servermd.h" #include "inputstr.h" #include "inpututils.h" +#include "mi.h" #include "Xnest.h" diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index 8956b859e..037ab1ecc 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -34,9 +34,6 @@ #ifdef HAVE_XWIN_CONFIG_H #include #endif - -#include "mi/mi_priv.h" - #include "win.h" #include "dix/dix_priv.h" diff --git a/mi/mi.h b/mi/mi.h index 670b3e606..d2858fe50 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,9 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqProcessInputEvents(void + ); + extern _X_EXPORT void mieqAddCallbackOnDrained(CallbackProcPtr callback, void *param); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index fa6205131..d03ff0869 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -26,6 +26,5 @@ void mieqFini(void); void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e); void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen); void mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen); -void mieqProcessInputEvents(void); #endif /* _XSERVER_MI_PRIV_H */ From a7dd684057b307e68a1b335f2b406e1aa6a7499c Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:39:25 +0100 Subject: [PATCH 24/40] Revert "mi: unexport mieqProcessDeviceEvent()" This reverts commit 0f7770bce3ccbd388c43c3ea0650ce34f00f7c18. --- Xext/xtest.c | 2 +- Xi/exevents.c | 2 +- dix/devices.c | 2 +- dix/gestures.c | 2 +- dix/touch.c | 2 +- mi/mi.h | 5 +++++ mi/mi_priv.h | 1 - xkb/xkbActions.c | 2 +- 8 files changed, 11 insertions(+), 7 deletions(-) diff --git a/Xext/xtest.c b/Xext/xtest.c index 69ca1db08..13f550154 100644 --- a/Xext/xtest.c +++ b/Xext/xtest.c @@ -38,7 +38,6 @@ #include "dix/input_priv.h" #include "dix/dix_priv.h" #include "dix/exevents_priv.h" -#include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include "os/client_priv.h" #include "os/osdep.h" @@ -52,6 +51,7 @@ #include "scrnintstr.h" #include "dixevents.h" #include "sleepuntil.h" +#include "mi.h" #include "xkbsrv.h" #include "xkbstr.h" #include "exglobals.h" diff --git a/Xi/exevents.c b/Xi/exevents.c index ae4268696..4dd675315 100644 --- a/Xi/exevents.c +++ b/Xi/exevents.c @@ -93,7 +93,6 @@ SOFTWARE. #include "dix/eventconvert.h" #include "dix/exevents_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "inputstr.h" #include "windowstr.h" @@ -109,6 +108,7 @@ SOFTWARE. #include "xiquerydevice.h" /* For List*Info */ #include "eventstr.h" #include "inpututils.h" +#include "mi.h" #include "xkbsrv.h" #define WID(w) ((w) ? ((w)->drawable.id) : 0) diff --git a/dix/devices.c b/dix/devices.c index 740390207..85805231d 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -60,7 +60,6 @@ SOFTWARE. #include "dix/exevents_priv.h" #include "dix/input_priv.h" #include "dix/ptrveloc_priv.h" -#include "mi/mi_priv.h" #include "os/osdep.h" #include "xkb/xkbsrv_priv.h" @@ -74,6 +73,7 @@ SOFTWARE. #include "ptrveloc.h" #include "privates.h" #include "xace.h" +#include "mi.h" #include "dispatch.h" #include "swaprep.h" #include "dixevents.h" diff --git a/dix/gestures.c b/dix/gestures.c index 4889a145a..4810ce030 100644 --- a/dix/gestures.c +++ b/dix/gestures.c @@ -29,7 +29,6 @@ #include "dix/dixgrabs_priv.h" #include "dix/eventconvert.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "inputstr.h" #include "scrnintstr.h" @@ -38,6 +37,7 @@ #include "exglobals.h" #include "inpututils.h" #include "windowstr.h" +#include "mi.h" #define GESTURE_HISTORY_SIZE 100 diff --git a/dix/touch.c b/dix/touch.c index 749454637..31011b059 100644 --- a/dix/touch.c +++ b/dix/touch.c @@ -31,7 +31,6 @@ #include "dix/eventconvert.h" #include "dix/exevents_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "inputstr.h" #include "scrnintstr.h" @@ -39,6 +38,7 @@ #include "exglobals.h" #include "inpututils.h" #include "windowstr.h" +#include "mi.h" #define TOUCH_HISTORY_SIZE 100 diff --git a/mi/mi.h b/mi/mi.h index d2858fe50..36c4fb179 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,11 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqProcessDeviceEvent(DeviceIntPtr /* dev */ , + InternalEvent * /* event */ , + ScreenPtr /* screen */ + ); + extern _X_EXPORT void mieqProcessInputEvents(void ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index d03ff0869..bba4c9a29 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -25,6 +25,5 @@ Bool mieqInit(void); void mieqFini(void); void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e); void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen); -void mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen); #endif /* _XSERVER_MI_PRIV_H */ diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 260f453ee..8b48255c0 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -37,7 +37,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "dix/dix_priv.h" #include "dix/dixgrabs_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include "xkb/xkbsrv_priv.h" @@ -45,6 +44,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "inputstr.h" #include "exevents.h" #include "eventstr.h" +#include "mi.h" #include "mipointer.h" #include "inpututils.h" From df69bf6b31888a4bdba96436debbb52b1fd675a6 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:39:26 +0100 Subject: [PATCH 25/40] Revert "mi: unexport mieqSwitchScreen()" This reverts commit 413e6ed2c890bb497268800fbd12e18a655f51ce. --- mi/mi.h | 5 +++++ mi/mi_priv.h | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index 36c4fb179..231f0d1a6 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,11 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqSwitchScreen(DeviceIntPtr /* pDev */ , + ScreenPtr /*pScreen */ , + Bool /*set_dequeue_screen */ + ); + extern _X_EXPORT void mieqProcessDeviceEvent(DeviceIntPtr /* dev */ , InternalEvent * /* event */ , ScreenPtr /* screen */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index bba4c9a29..906238a81 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -8,7 +8,6 @@ #include #include -#include "dix/screenint_priv.h" #include "include/events.h" #include "include/gc.h" #include "include/pixmap.h" @@ -24,6 +23,5 @@ void miStepDash(int dist, int * pDashIndex, unsigned char * pDash, Bool mieqInit(void); void mieqFini(void); void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e); -void mieqSwitchScreen(DeviceIntPtr pDev, ScreenPtr pScreen, Bool set_dequeue_screen); #endif /* _XSERVER_MI_PRIV_H */ From c2914634c4cf768fb2e8ad52ee03ae76acf2ad20 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:39:44 +0100 Subject: [PATCH 26/40] Revert "mi: unexport mieqEnqueue()" This reverts commit 9dd280607f51cf1bb0337283c9f9dc0540c35ab0. --- Xi/xibarriers.c | 2 +- dix/getevents.c | 1 + hw/xfree86/common/xf86DGA.c | 2 +- mi/mi.h | 4 ++++ mi/mi_priv.h | 3 --- mi/mipointer.c | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Xi/xibarriers.c b/Xi/xibarriers.c index bca99b3d3..f6f3b16f4 100644 --- a/Xi/xibarriers.c +++ b/Xi/xibarriers.c @@ -45,7 +45,6 @@ #include "dix/dix_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "xibarriers.h" #include "scrnintstr.h" @@ -59,6 +58,7 @@ #include "list.h" #include "exglobals.h" #include "eventstr.h" +#include "mi.h" RESTYPE PointerBarrierType; diff --git a/dix/getevents.c b/dix/getevents.c index 4cdd2b711..a81a201b2 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -55,6 +55,7 @@ #include "eventstr.h" #include "eventconvert.h" #include "inpututils.h" +#include "mi.h" #include "windowstr.h" #include "xkbsrv.h" diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 41b58d9e3..1fbc36a66 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -50,7 +50,6 @@ #include "dix/dix_priv.h" #include "dix/eventconvert.h" #include "dix/exevents_priv.h" -#include "mi/mi_priv.h" #include "xf86.h" #include "xf86str.h" @@ -68,6 +67,7 @@ #include "exglobals.h" #include "eventstr.h" #include "xf86Extensions.h" +#include "mi.h" #include "misc.h" #include "dixstruct.h" #include "dixevents.h" diff --git a/mi/mi.h b/mi/mi.h index 231f0d1a6..5e8339ef8 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,10 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqEnqueue(DeviceIntPtr /*pDev */ , + InternalEvent * /*e */ + ); + extern _X_EXPORT void mieqSwitchScreen(DeviceIntPtr /* pDev */ , ScreenPtr /*pScreen */ , Bool /*set_dequeue_screen */ diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 906238a81..1324dcac1 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -8,7 +8,6 @@ #include #include -#include "include/events.h" #include "include/gc.h" #include "include/pixmap.h" #include "include/screenint.h" @@ -19,9 +18,7 @@ void miScreenClose(ScreenPtr pScreen); void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); void miStepDash(int dist, int * pDashIndex, unsigned char * pDash, int numInDashList, int *pDashOffset); - Bool mieqInit(void); void mieqFini(void); -void mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e); #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/mipointer.c b/mi/mipointer.c index 5196b2688..4fd0a0c11 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -54,12 +54,12 @@ in this Software without prior written authorization from The Open Group. #include "dix/dix_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" +#include "mi.h" #include "scrnintstr.h" #include "mipointrst.h" #include "cursorstr.h" From 78f41e3db6045e420f28ea8fdf06f2c2a45f1131 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:39:45 +0100 Subject: [PATCH 27/40] Revert "mi: unexport mieqFini()" This reverts commit 47427903515ada60deeef593fbb543aeb24fc64c. --- mi/mi.h | 2 ++ mi/mi_priv.h | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index 5e8339ef8..4f41fbe72 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,8 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT void mieqFini(void); + extern _X_EXPORT void mieqEnqueue(DeviceIntPtr /*pDev */ , InternalEvent * /*e */ ); diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 1324dcac1..90c231ed1 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -19,6 +19,5 @@ void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); void miStepDash(int dist, int * pDashIndex, unsigned char * pDash, int numInDashList, int *pDashOffset); Bool mieqInit(void); -void mieqFini(void); #endif /* _XSERVER_MI_PRIV_H */ From 6d8dbe3db825483e44fc5e98437ded5eab47efed Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:40:39 +0100 Subject: [PATCH 28/40] Revert "mi: unexport mieqInit()" This reverts commit 5ac361cce9b22b2200d39ca4cc8191d90035b8bb. --- hw/kdrive/src/kinput.c | 6 ++++++ hw/vfb/InitInput.c | 8 +++----- hw/xfree86/common/xf86Init.c | 2 +- hw/xnest/Init.c | 2 +- hw/xquartz/darwinEvents.c | 4 +--- hw/xwayland/xwayland-input.c | 2 +- hw/xwin/InitInput.c | 3 --- mi/mi.h | 3 +++ mi/mi_priv.h | 2 -- mi/mieq.c | 2 +- test/input.c | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index ad5d4b047..3ee06203f 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -53,6 +53,12 @@ #include "inpututils.h" #include "optionstr.h" +#include "os/cmdline.h" + +#if defined(CONFIG_UDEV) || defined(CONFIG_HAL) +#include +#endif + #define AtomFromName(x) MakeAtom(x, strlen(x), 1) struct KdConfigDevice { diff --git a/hw/vfb/InitInput.c b/hw/vfb/InitInput.c index 447f23931..ca451604d 100644 --- a/hw/vfb/InitInput.c +++ b/hw/vfb/InitInput.c @@ -29,16 +29,14 @@ from The Open Group. #include #include +#include "mi.h" #include -#include -#include - -#include "mi/mi_priv.h" - #include "scrnintstr.h" #include "inputstr.h" +#include #include "mipointer.h" #include "xkbsrv.h" +#include #include "xserver-properties.h" #include "exevents.h" #include "extinit.h" diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 970cc0dc4..95ce29433 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -55,13 +55,13 @@ #include "config/hotplug_priv.h" #include "dix/input_priv.h" #include "dix/screenint_priv.h" -#include "mi/mi_priv.h" #include "os/cmdline.h" #include "os/ddx_priv.h" #include "servermd.h" #include "windowstr.h" #include "scrnintstr.h" +#include "mi.h" #include "systemd-logind.h" #include "loaderProcs.h" diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index e9c5fc59b..6e5a11657 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -21,7 +21,6 @@ is" without express or implied warranty. #include #include "dix/screenint_priv.h" -#include "mi/mi_priv.h" #include "os/ddx_priv.h" #include "screenint.h" @@ -30,6 +29,7 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "windowstr.h" #include "servermd.h" +#include "mi.h" #include "dixfontstr.h" #include "extinit_priv.h" #include "Xnest.h" diff --git a/hw/xquartz/darwinEvents.c b/hw/xquartz/darwinEvents.c index 5aa16ffab..b8d85a17e 100644 --- a/hw/xquartz/darwinEvents.c +++ b/hw/xquartz/darwinEvents.c @@ -45,16 +45,14 @@ #include #include #include - -#include "mi/mi_priv.h" #include "os/client_priv.h" - #include "misc.h" #include "windowstr.h" #include "pixmapstr.h" #include "inputstr.h" #include "inpututils.h" #include "eventstr.h" +#include "mi.h" #include "scrnintstr.h" #include "mipointer.h" #include "os.h" diff --git a/hw/xwayland/xwayland-input.c b/hw/xwayland/xwayland-input.c index cd2046e1d..73a8b4fb7 100644 --- a/hw/xwayland/xwayland-input.c +++ b/hw/xwayland/xwayland-input.c @@ -32,13 +32,13 @@ #include "dix/dix_priv.h" #include "dix/exevents_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include #include #include #include +#include #include #include #include diff --git a/hw/xwin/InitInput.c b/hw/xwin/InitInput.c index c50464a60..6aced4f9c 100644 --- a/hw/xwin/InitInput.c +++ b/hw/xwin/InitInput.c @@ -29,9 +29,6 @@ #ifdef HAVE_XWIN_CONFIG_H #include #endif - -#include "mi/mi_priv.h" - #include "win.h" #include "dixstruct_priv.h" #include "inputstr.h" diff --git a/mi/mi.h b/mi/mi.h index 4f41fbe72..e1d37a285 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -114,6 +114,9 @@ miDoCopy(DrawablePtr pSrcDrawable, typedef struct _DeviceRec *DevicePtr; #endif +extern _X_EXPORT Bool mieqInit(void + ); + extern _X_EXPORT void mieqFini(void); extern _X_EXPORT void mieqEnqueue(DeviceIntPtr /*pDev */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 90c231ed1..bd92ba171 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -5,7 +5,6 @@ #ifndef _XSERVER_MI_PRIV_H #define _XSERVER_MI_PRIV_H -#include #include #include "include/gc.h" @@ -18,6 +17,5 @@ void miScreenClose(ScreenPtr pScreen); void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); void miStepDash(int dist, int * pDashIndex, unsigned char * pDash, int numInDashList, int *pDashOffset); -Bool mieqInit(void); #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/mieq.c b/mi/mieq.c index 74d10a314..c4018335c 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -41,7 +41,6 @@ in this Software without prior written authorization from The Open Group. #include #include -#include "mi/mi_priv.h" #include "mi/mipointer_priv.h" #include "os/screensaver.h" @@ -50,6 +49,7 @@ in this Software without prior written authorization from The Open Group. #include "pixmapstr.h" #include "inputstr.h" #include "inpututils.h" +#include "mi.h" #include "mipointer.h" #include "scrnintstr.h" #include "extinit.h" diff --git a/test/input.c b/test/input.c index 39057c828..ef1d14cd9 100644 --- a/test/input.c +++ b/test/input.c @@ -37,7 +37,6 @@ #include "dix/eventconvert.h" #include "dix/exevents_priv.h" #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "misc.h" #include "resource.h" @@ -46,6 +45,7 @@ #include "exglobals.h" #include "eventstr.h" #include "inpututils.h" +#include "mi.h" #include "assert.h" #include "tests-common.h" From 0afa60c22ce90b5d58159761b4ce52bed159b915 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:40:41 +0100 Subject: [PATCH 29/40] Revert "mi: unexport miStepDash()" This reverts commit 8a6bbc80f3e0e2dbe583f39f3360aaed9a77312b. --- mi/mi.h | 9 +++++++++ mi/mi_priv.h | 2 -- mi/midash.c | 2 -- mi/miwideline.c | 4 +--- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index e1d37a285..c2a1c4a10 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -108,6 +108,15 @@ miDoCopy(DrawablePtr pSrcDrawable, int xOut, int yOut, miCopyProc copyProc, Pixel bitplane, void *closure); +/* midash.c */ + +extern _X_EXPORT void miStepDash(int /*dist */ , + int * /*pDashIndex */ , + unsigned char * /*pDash */ , + int /*numInDashList */ , + int * /*pDashOffset */ + ); + /* mieq.c */ #ifndef INPUT_H diff --git a/mi/mi_priv.h b/mi/mi_priv.h index bd92ba171..7711d4255 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -15,7 +15,5 @@ void miScreenClose(ScreenPtr pScreen); void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); -void miStepDash(int dist, int * pDashIndex, unsigned char * pDash, - int numInDashList, int *pDashOffset); #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/midash.c b/mi/midash.c index fa3a02074..76bd4266d 100644 --- a/mi/midash.c +++ b/mi/midash.c @@ -45,8 +45,6 @@ SOFTWARE. ******************************************************************/ #include -#include "mi/mi_priv.h" - #include "regionstr.h" #include "mistruct.h" diff --git a/mi/miwideline.c b/mi/miwideline.c index 0498e9cd8..0d81519cf 100644 --- a/mi/miwideline.c +++ b/mi/miwideline.c @@ -63,13 +63,11 @@ SOFTWARE. #undef _XOPEN_SOURCE #endif #include - -#include "mi/mi_priv.h" - #include "windowstr.h" #include "gcstruct.h" #include "regionstr.h" #include "miwideline.h" +#include "mi.h" typedef struct { int count; /* number of spans */ From 08f3e935029de41e6466ddd3d2c410aec5beac64 Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:40:41 +0100 Subject: [PATCH 30/40] Revert "mi: unexport miWideArc()" This reverts commit aaaa0a35e5981b77f5bc9303799db566e746b600. --- mi/mi.h | 5 +++++ mi/mi_priv.h | 9 +-------- mi/miarc.c | 6 ++---- mi/mizerarc.c | 4 +--- 4 files changed, 9 insertions(+), 15 deletions(-) diff --git a/mi/mi.h b/mi/mi.h index c2a1c4a10..d0c50a35d 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -67,6 +67,11 @@ typedef struct _miDash *miDashPtr; /* miarc.c */ +extern _X_EXPORT void miWideArc(DrawablePtr pDraw, + GCPtr pGC, + int narcs, + xArc * parcs); + extern _X_EXPORT void miPolyArc(DrawablePtr /*pDraw */ , GCPtr /*pGC */ , int /*narcs */ , diff --git a/mi/mi_priv.h b/mi/mi_priv.h index 7711d4255..26c9d158f 100644 --- a/mi/mi_priv.h +++ b/mi/mi_priv.h @@ -5,15 +5,8 @@ #ifndef _XSERVER_MI_PRIV_H #define _XSERVER_MI_PRIV_H -#include - -#include "include/gc.h" -#include "include/pixmap.h" -#include "include/screenint.h" -#include "mi/mi.h" +#include "screenint.h" void miScreenClose(ScreenPtr pScreen); -void miWideArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc * parcs); - #endif /* _XSERVER_MI_PRIV_H */ diff --git a/mi/miarc.c b/mi/miarc.c index 9ea4a6155..602ccbf76 100644 --- a/mi/miarc.c +++ b/mi/miarc.c @@ -51,17 +51,15 @@ SOFTWARE. #include #include #include -#include - -#include "mi/mi_priv.h" - #include "misc.h" #include "gcstruct.h" #include "scrnintstr.h" #include "pixmapstr.h" #include "windowstr.h" #include "mifpoly.h" +#include "mi.h" #include "mifillarc.h" +#include #define EPSILON 0.000001 #define ISEQUAL(a,b) (fabs((a) - (b)) <= EPSILON) diff --git a/mi/mizerarc.c b/mi/mizerarc.c index 90dde9f8b..ca2cb4087 100644 --- a/mi/mizerarc.c +++ b/mi/mizerarc.c @@ -37,12 +37,10 @@ Author: Bob Scheifler, MIT X Consortium #include #include #include - -#include "mi/mi_priv.h" - #include "regionstr.h" #include "gcstruct.h" #include "pixmapstr.h" +#include "mi.h" #include "mizerarc.h" #define FULLCIRCLE (360 * 64) From 859e4282d4bbba1add3fa6f4ce5c31fe9757b37f Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:40:42 +0100 Subject: [PATCH 31/40] Revert "mi: make CopyGetMasterEvent() static" This reverts commit 12c507cd1fb3d6f1849313a539f5d0c952535872. --- mi/mi.h | 5 +++++ mi/mieq.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/mi/mi.h b/mi/mi.h index d0c50a35d..10432a71a 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -156,6 +156,11 @@ extern _X_EXPORT void mieqAddCallbackOnDrained(CallbackProcPtr callback, extern _X_EXPORT void mieqRemoveCallbackOnDrained(CallbackProcPtr callback, void *param); +extern DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr /* sdev */ , + InternalEvent * /* original */ , + InternalEvent * /* copy */ + ); + /** * Custom input event handler. If you need to process input events in some * other way than the default path, register an input event handler for the diff --git a/mi/mieq.c b/mi/mieq.c index c4018335c..caf360dcf 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -384,7 +384,7 @@ FixUpEventForMaster(DeviceIntPtr mdev, DeviceIntPtr sdev, * @param copy The event after being copied * @return The master device or NULL if the device is a floating slave. */ -static DeviceIntPtr +DeviceIntPtr CopyGetMasterEvent(DeviceIntPtr sdev, InternalEvent *original, InternalEvent *copy) { From 5bd03e1824bcf18c1c84876ad4e357682e575ecb Mon Sep 17 00:00:00 2001 From: kohnish Date: Tue, 18 Nov 2025 21:40:43 +0100 Subject: [PATCH 32/40] Revert "mi: make miRecolorCursor() static" This reverts commit 6dbb957922754dbe386c1604170fe13850023020. --- dix/getevents.c | 1 - hw/xnest/Screen.c | 1 + mi/mi.h | 8 ++++++++ mi/micmap.c | 2 +- mi/mipointer.c | 6 +----- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/dix/getevents.c b/dix/getevents.c index a81a201b2..465747287 100644 --- a/dix/getevents.c +++ b/dix/getevents.c @@ -41,7 +41,6 @@ #include #include "dix/input_priv.h" -#include "mi/mi_priv.h" #include "misc.h" #include "resource.h" diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index bab6096b1..a41c5b341 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -17,6 +17,7 @@ is" without express or implied warranty. #include #include +#include "mi/mi.h" #include "mi/mi_priv.h" #include "mi/mipointer_priv.h" diff --git a/mi/mi.h b/mi/mi.h index 10432a71a..b7b320d2c 100644 --- a/mi/mi.h +++ b/mi/mi.h @@ -113,6 +113,14 @@ miDoCopy(DrawablePtr pSrcDrawable, int xOut, int yOut, miCopyProc copyProc, Pixel bitplane, void *closure); +/* micursor.c */ + +extern _X_EXPORT void miRecolorCursor(DeviceIntPtr /* pDev */ , + ScreenPtr /*pScr */ , + CursorPtr /*pCurs */ , + Bool /*displayed */ + ); + /* midash.c */ extern _X_EXPORT void miStepDash(int /*dist */ , diff --git a/mi/micmap.c b/mi/micmap.c index 8c132335c..6d2abf63a 100644 --- a/mi/micmap.c +++ b/mi/micmap.c @@ -33,7 +33,7 @@ #include #include "dix/colormap_priv.h" - +#include "os/osdep.h" #include "scrnintstr.h" #include "colormapst.h" #include "resource.h" diff --git a/mi/mipointer.c b/mi/mipointer.c index 4fd0a0c11..0571f1627 100644 --- a/mi/mipointer.c +++ b/mi/mipointer.c @@ -115,10 +115,6 @@ static void miPointerMoveNoEvent(DeviceIntPtr pDev, ScreenPtr pScreen, int x, static InternalEvent *mipointermove_events; /* for WarpPointer MotionNotifies */ -static void -miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, - CursorPtr pCurs, Bool displayed); - Bool miPointerInitialize(ScreenPtr pScreen, miPointerSpriteFuncPtr spriteFuncs, @@ -299,7 +295,7 @@ miPointerSetCursorPosition(DeviceIntPtr pDev, ScreenPtr pScreen, return TRUE; } -static void +void miRecolorCursor(DeviceIntPtr pDev, ScreenPtr pScr, CursorPtr pCurs, Bool displayed) { From eb45328bd9dd376e0a4819557e8bce57c81abdcc Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:04:51 +0100 Subject: [PATCH 33/40] Revert "dix: unexport fields from opaque.h not used by modules/drivers" This reverts commit 06b599edb65c171c4104e4b0977b9be0130f03e8. --- Xext/saver.c | 1 + Xext/sync.c | 1 + dix/dix_priv.h | 22 ---------------------- dix/main.c | 4 ++++ glx/vndext.c | 2 -- hw/xfree86/common/xf86Events.c | 2 -- hw/xwayland/xwayland-window.c | 2 -- hw/xwin/InitOutput.c | 2 -- hw/xwin/wincreatewnd.c | 3 --- hw/xwin/windisplay.c | 2 -- hw/xwin/wintrayicon.c | 2 -- include/opaque.h | 21 +++++++++++++++++++++ os/WaitFor.c | 2 +- os/connection.c | 1 + os/osinit.c | 1 - os/utils.c | 2 -- os/xdmcp.c | 2 +- randr/rrproperty.c | 6 +----- randr/rrproviderproperty.c | 3 --- xfixes/disconnect.c | 1 + xkb/ddxLoad.c | 1 - 21 files changed, 32 insertions(+), 51 deletions(-) diff --git a/Xext/saver.c b/Xext/saver.c index f82607e7a..0a239cdd9 100644 --- a/Xext/saver.c +++ b/Xext/saver.c @@ -46,6 +46,7 @@ in this Software without prior written authorization from the X Consortium. #include "extnsionst.h" #include "dixstruct.h" #include "resource.h" +#include "opaque.h" #include "gcstruct.h" #include "cursorstr.h" #include "colormapst.h" diff --git a/Xext/sync.c b/Xext/sync.c index e0c012849..60cfc837d 100644 --- a/Xext/sync.c +++ b/Xext/sync.c @@ -67,6 +67,7 @@ PERFORMANCE OF THIS SOFTWARE. #include "dixstruct.h" #include "pixmapstr.h" #include "resource.h" +#include "opaque.h" #include "syncsrv.h" #include "syncsdk.h" #include "protocol-versions.h" diff --git a/dix/dix_priv.h b/dix/dix_priv.h index ec2ff44be..bb2773a24 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -230,26 +230,4 @@ int CorePointerProc(DeviceIntPtr dev, int what); int CoreKeyboardProc(DeviceIntPtr dev, int what); -extern Bool whiteRoot; - -extern volatile char isItTimeToYield; - -/* bit values for dispatchException */ -#define DE_RESET 1 -#define DE_TERMINATE 2 -#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */ - -extern volatile char dispatchException; - -extern int ScreenSaverBlanking; -extern int ScreenSaverAllowExposures; -extern int defaultScreenSaverBlanking; -extern int defaultScreenSaverAllowExposures; -extern const char *display; -extern int displayfd; -extern Bool explicit_display; - -extern Bool disableBackingStore; -extern Bool enableBackingStore; - #endif /* _XSERVER_DIX_PRIV_H */ diff --git a/dix/main.c b/dix/main.c index 040dfd225..d4b78e248 100644 --- a/dix/main.c +++ b/dix/main.c @@ -110,6 +110,10 @@ Equipment Corporation. #include "colormapst.h" #include "cursorstr.h" #include "selection.h" +#include +#include +#include +#include "opaque.h" #include "servermd.h" #include "dixfont.h" #include "extnsionst.h" diff --git a/glx/vndext.c b/glx/vndext.c index a0519ff65..92b3001a3 100644 --- a/glx/vndext.c +++ b/glx/vndext.c @@ -40,8 +40,6 @@ #include #include "vndservervendor.h" -#include "dix/dix_priv.h" - ExtensionEntry *GlxExtensionEntry; int GlxErrorBase = 0; static CallbackListRec vndInitCallbackList; diff --git a/hw/xfree86/common/xf86Events.c b/hw/xfree86/common/xf86Events.c index 0ce862fc9..ed4f85e9a 100644 --- a/hw/xfree86/common/xf86Events.c +++ b/hw/xfree86/common/xf86Events.c @@ -62,8 +62,6 @@ #include "dix/input_priv.h" -#include "dix/dix_priv.h" - #include "misc.h" #include "xf86.h" #include "xf86Priv.h" diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index dac4b4ed6..af49de8ef 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -32,8 +32,6 @@ #include #include -#include "dix/dix_priv.h" - #include "compositeext.h" #include "compint.h" #include "inputstr.h" diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index aeb6b9f84..30d3f625b 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -70,8 +70,6 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, #include "extinit_priv.h" #include "pseudoramiX/pseudoramiX.h" -#include "dix/dix_priv.h" - #include "glx_extinit.h" #ifdef XWIN_GLX_WINDOWS #include "glx/glwindows.h" diff --git a/hw/xwin/wincreatewnd.c b/hw/xwin/wincreatewnd.c index 58247675f..e3238ae76 100644 --- a/hw/xwin/wincreatewnd.c +++ b/hw/xwin/wincreatewnd.c @@ -31,9 +31,6 @@ #ifdef HAVE_XWIN_CONFIG_H #include #endif - -#include "dix/dix_priv.h" - #include "win.h" #include "shellapi.h" diff --git a/hw/xwin/windisplay.c b/hw/xwin/windisplay.c index 52ece1d88..17f0c7789 100644 --- a/hw/xwin/windisplay.c +++ b/hw/xwin/windisplay.c @@ -30,8 +30,6 @@ #endif #include // for display -#include "dix/dix_priv.h" // for display - #include "windisplay.h" #include "winmsg.h" diff --git a/hw/xwin/wintrayicon.c b/hw/xwin/wintrayicon.c index 7da170d27..5d1e6aefa 100644 --- a/hw/xwin/wintrayicon.c +++ b/hw/xwin/wintrayicon.c @@ -38,8 +38,6 @@ #include "winprefs.h" #include "winclipboard/winclipboard.h" -#include "dix/dix_priv.h" - /* * Initialize the tray icon */ diff --git a/include/opaque.h b/include/opaque.h index 7850792e8..022efb4bc 100644 --- a/include/opaque.h +++ b/include/opaque.h @@ -35,6 +35,27 @@ from The Open Group. // needed by libglx and libglamor (server modules) extern _X_EXPORT Bool enableIndirectGLX; +extern _X_EXPORT volatile char isItTimeToYield; +extern _X_EXPORT volatile char dispatchException; + +/* bit values for dispatchException */ +#define DE_RESET 1 +#define DE_TERMINATE 2 +#define DE_PRIORITYCHANGE 4 /* set when a client's priority changes */ + +extern _X_EXPORT int ScreenSaverBlanking; +extern _X_EXPORT int ScreenSaverAllowExposures; +extern _X_EXPORT int defaultScreenSaverBlanking; +extern _X_EXPORT int defaultScreenSaverAllowExposures; +extern _X_EXPORT const char *display; +extern _X_EXPORT int displayfd; +extern _X_EXPORT Bool explicit_display; + +extern _X_EXPORT Bool disableBackingStore; +extern _X_EXPORT Bool enableBackingStore; +extern _X_EXPORT Bool RunFromSigStopParent; + +extern _X_EXPORT Bool whiteRoot; extern _X_EXPORT Bool bgNoneRoot; #endif /* OPAQUE_H */ diff --git a/os/WaitFor.c b/os/WaitFor.c index a616850ab..e7cbf81e0 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -70,7 +70,7 @@ SOFTWARE. #include "misc.h" #include "osdep.h" #include "dixstruct_priv.h" -#include "globals.h" +#include "opaque.h" #ifdef DPMSExtension #include "dpmsproc.h" #endif diff --git a/os/connection.c b/os/connection.c index 64aca9081..4618c7ce3 100644 --- a/os/connection.c +++ b/os/connection.c @@ -103,6 +103,7 @@ SOFTWARE. #include "os/osdep.h" #include "misc.h" /* for typedef of pointer */ +#include "opaque.h" #include "dixstruct_priv.h" #include "globals.h" #include "xace.h" diff --git a/os/osinit.c b/os/osinit.c index 726602d0c..0e89e84c7 100644 --- a/os/osinit.c +++ b/os/osinit.c @@ -61,7 +61,6 @@ SOFTWARE. #include #endif -#include "dix/dix_priv.h" #include "os/busfault.h" #include "os/serverlock.h" diff --git a/os/utils.c b/os/utils.c index 57c21a448..bc62d37df 100644 --- a/os/utils.c +++ b/os/utils.c @@ -184,8 +184,6 @@ Bool noGEExtension = FALSE; Bool CoreDump; -Bool enableIndirectGLX = FALSE; - Bool AllowByteSwappedClients = FALSE; #ifdef XINERAMA diff --git a/os/xdmcp.c b/os/xdmcp.c index 955cee1b4..395635966 100644 --- a/os/xdmcp.c +++ b/os/xdmcp.c @@ -38,7 +38,6 @@ #include #include -#include "dix/dix_priv.h" #include "os/auth.h" #include "misc.h" @@ -47,6 +46,7 @@ #include "xdmauth.h" #include "input.h" #include "dixstruct.h" +#include "opaque.h" #define XSERV_t #define TRANS_SERVER diff --git a/randr/rrproperty.c b/randr/rrproperty.c index f97c3464f..594fe5185 100644 --- a/randr/rrproperty.c +++ b/randr/rrproperty.c @@ -19,15 +19,11 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -#include - -#include - -#include "dix/dix_priv.h" #include "randrstr_priv.h" #include "propertyst.h" #include "swaprep.h" +#include static int DeliverPropertyEvent(WindowPtr pWin, void *value) diff --git a/randr/rrproviderproperty.c b/randr/rrproviderproperty.c index e84e0dff3..7c851c86b 100644 --- a/randr/rrproviderproperty.c +++ b/randr/rrproviderproperty.c @@ -19,9 +19,6 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ -#include - -#include "dix/dix_priv.h" #include "randrstr_priv.h" #include "propertyst.h" diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c index 5b2945a4a..41be12d95 100644 --- a/xfixes/disconnect.c +++ b/xfixes/disconnect.c @@ -47,6 +47,7 @@ #include "dix/dix_priv.h" #include "xfixesint.h" +#include "opaque.h" static DevPrivateKeyRec ClientDisconnectPrivateKeyRec; diff --git a/xkb/ddxLoad.c b/xkb/ddxLoad.c index 30f593bda..f3026ea3d 100644 --- a/xkb/ddxLoad.c +++ b/xkb/ddxLoad.c @@ -38,7 +38,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#include "dix/dix_priv.h" #include "os/osdep.h" #include "inputstr.h" From 543bf972a52e7a627c17bea9f7f6f34ff509c644 Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:17:53 +0100 Subject: [PATCH 34/40] Revert "os: unexport ddx callbacks" This reverts commit e5c8b664d392afd626b03a0f06e7ad186beeaa5e. --- dix/dispatch.c | 2 -- dix/main.c | 1 - hw/kdrive/ephyr/ephyrinit.c | 1 + hw/kdrive/src/kdrive.c | 2 -- hw/vfb/InitOutput.c | 2 +- hw/xfree86/common/xf86Configure.c | 2 +- hw/xfree86/common/xf86Init.c | 2 +- hw/xnest/Args.c | 2 -- hw/xnest/Init.c | 2 +- hw/xquartz/darwin.c | 1 + hw/xwin/InitOutput.c | 6 ++---- hw/xwin/winprocarg.c | 1 - include/os.h | 21 +++++++++++++++++++++ os/client_priv.h | 2 -- os/ddx_priv.h | 27 --------------------------- os/inputthread.c | 1 - os/log.c | 7 ++++++- os/osdep.h | 1 - os/utils.c | 5 ++++- 19 files changed, 39 insertions(+), 49 deletions(-) delete mode 100644 os/ddx_priv.h diff --git a/dix/dispatch.c b/dix/dispatch.c index 462b26516..15dbcc80c 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -112,7 +112,6 @@ Equipment Corporation. #include "include/resource.h" #include "os/auth.h" #include "os/client_priv.h" -#include "os/ddx_priv.h" #include "os/osdep.h" #include "os/screensaver.h" @@ -4147,4 +4146,3 @@ DetachOffloadGPU(ScreenPtr secondary) assert(secondary->is_offload_secondary); secondary->is_offload_secondary = FALSE; } - diff --git a/dix/main.c b/dix/main.c index d4b78e248..edaf531b2 100644 --- a/dix/main.c +++ b/dix/main.c @@ -94,7 +94,6 @@ Equipment Corporation. #include "os/auth.h" #include "os/client_priv.h" #include "os/cmdline.h" -#include "os/ddx_priv.h" #include "os/osdep.h" #include "os/screensaver.h" diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 16c477dad..9306f3367 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -28,6 +28,7 @@ #include "dix/dix_priv.h" #include "os/cmdline.h" #include "os/ddx_priv.h" +#include "os/osdep.h" #include "ephyr.h" #include "ephyrlog.h" diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index ba4feda03..e465f0f9a 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -25,13 +25,11 @@ #include "config/hotplug_priv.h" #include "dix/screenint_priv.h" #include "os/cmdline.h" -#include "os/ddx_priv.h" #include "kdrive.h" #include #include #include "privates.h" - #ifdef RANDR #include #endif diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 9463bc118..f60f1f8a3 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -41,7 +41,7 @@ from The Open Group. #include "dix/screenint_priv.h" #include "mi/mipointer_priv.h" #include "os/cmdline.h" -#include "os/ddx_priv.h" +#include "os/osdep.h" #include "scrnintstr.h" #include "servermd.h" diff --git a/hw/xfree86/common/xf86Configure.c b/hw/xfree86/common/xf86Configure.c index d1f7ba14b..6c71d83cf 100644 --- a/hw/xfree86/common/xf86Configure.c +++ b/hw/xfree86/common/xf86Configure.c @@ -29,7 +29,7 @@ #include -#include "os/ddx_priv.h" +#include "os/osdep.h" #include "xf86.h" #include "xf86Config.h" diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 95ce29433..906c8ee58 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -56,7 +56,7 @@ #include "dix/input_priv.h" #include "dix/screenint_priv.h" #include "os/cmdline.h" -#include "os/ddx_priv.h" +#include "os/osdep.h" #include "servermd.h" #include "windowstr.h" diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index aa87558f3..e190ed054 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -17,8 +17,6 @@ is" without express or implied warranty. #include #include -#include "os/ddx_priv.h" - #include "screenint.h" #include "input.h" #include "misc.h" diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 6e5a11657..1f268b64f 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -21,7 +21,7 @@ is" without express or implied warranty. #include #include "dix/screenint_priv.h" -#include "os/ddx_priv.h" +#include "os/osdep.h" #include "screenint.h" #include "input.h" diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index aba4869f8..fcfcd554a 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -35,6 +35,7 @@ #include #include "os/ddx_priv.h" +#include "os/osdep.h" #include "os.h" #include "servermd.h" diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 30d3f625b..47ec5ba77 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -32,13 +32,10 @@ from The Open Group. #include #endif -#include "win.h" - #include "dix/dix_priv.h" -#include "dix/screenint_priv.h" -#include "os/ddx_priv.h" #include "os/osdep.h" +#include "win.h" #include "winmsg.h" #include "winconfig.h" #include "winprefs.h" @@ -64,6 +61,7 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, #endif #include "dix/screenint_priv.h" +#include "os/osdep.h" #include "winmonitors.h" #include "nonsdk_extinit.h" diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index 4f753982f..9142cc5d0 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -37,7 +37,6 @@ from The Open Group. #include "os/cmdline.h" #include "os/osdep.h" -#include "os/ddx_priv.h" #include <../xfree86/common/xorgVersion.h> #include "win.h" diff --git a/include/os.h b/include/os.h index c4e0f15fc..d3a024704 100644 --- a/include/os.h +++ b/include/os.h @@ -84,6 +84,14 @@ typedef struct _NewClientRec *NewClientPtr; #include #include +#ifdef DDXBEFORERESET +extern void ddxBeforeReset(void); +#endif + +extern _X_EXPORT Bool WaitForSomething(Bool clients_are_ready); + +extern _X_EXPORT int ReadRequestFromClient(ClientPtr /*client */ ); + extern _X_EXPORT int ReadFdFromClient(ClientPtr client); extern _X_EXPORT void SetCriticalOutputPending(void); @@ -245,6 +253,15 @@ PrivsElevated(void); extern _X_EXPORT int GetClientFd(ClientPtr); +extern _X_EXPORT Bool +ClientIsLocal(ClientPtr client); + +extern _X_EXPORT int +ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ ); + +extern _X_EXPORT void +ddxUseMsg(void); + /* stuff for ReplyCallback */ extern _X_EXPORT CallbackListPtr ReplyCallback; typedef struct { @@ -266,6 +283,10 @@ enum ExitCode { EXIT_ERR_DRIVERS = 3, }; +extern _X_EXPORT void +ddxGiveUp(enum ExitCode error); +extern _X_EXPORT void +ddxInputThreadInit(void); extern _X_EXPORT int TimeSinceLastInputEvent(void); diff --git a/os/client_priv.h b/os/client_priv.h index 88da283da..9d1c8c4d0 100644 --- a/os/client_priv.h +++ b/os/client_priv.h @@ -34,7 +34,6 @@ pid_t GetClientPid(struct _Client *client); const char *GetClientCmdName(struct _Client *client); const char *GetClientCmdArgs(struct _Client *client); -Bool ClientIsLocal(struct _Client *client); XID AuthorizationIDOfClient(struct _Client *client); const char *ClientAuthorized(struct _Client *client, unsigned int proto_n, @@ -43,7 +42,6 @@ const char *ClientAuthorized(struct _Client *client, char *auth_string); Bool AddClientOnOpenFD(int fd); void ListenOnOpenFD(int fd, int noxauth); -int ReadRequestFromClient(struct _Client *client); int WriteFdToClient(struct _Client *client, int fd, Bool do_close); Bool InsertFakeRequest(struct _Client *client, char *data, int count); void FlushAllOutput(void); diff --git a/os/ddx_priv.h b/os/ddx_priv.h deleted file mode 100644 index 5fd584c39..000000000 --- a/os/ddx_priv.h +++ /dev/null @@ -1,27 +0,0 @@ -/* SPDX-License-Identifier: MIT OR X11 - * - * Copyright © 2024 Enrico Weigelt, metux IT consult - */ -#ifndef _XSERVER_OS_DDX_PRIV_H -#define _XSERVER_OS_DDX_PRIV_H - -#include "os.h" - -/* callbacks of the DDX, which are called by DIX or OS layer. - DDX's need to implement these in order to handle DDX specific things. -*/ - -/* called before server reset */ -void ddxBeforeReset(void); - -/* called by ProcessCommandLine, so DDX can catch cmdline args */ -int ddxProcessArgument(int argc, char *argv[], int i); - -/* print DDX specific usage message */ -void ddxUseMsg(void); - -void ddxGiveUp(enum ExitCode error); - -void ddxInputThreadInit(void); - -#endif /* _XSERVER_OS_DDX_PRIV_H */ diff --git a/os/inputthread.c b/os/inputthread.c index 623648256..1a417c0a5 100644 --- a/os/inputthread.c +++ b/os/inputthread.c @@ -34,7 +34,6 @@ #include #include "dix/input_priv.h" -#include "os/ddx_priv.h" #include "inputstr.h" #include "opaque.h" diff --git a/os/log.c b/os/log.c index 7d91ca0a4..c42500a66 100644 --- a/os/log.c +++ b/os/log.c @@ -92,10 +92,15 @@ OR PERFORMANCE OF THIS SOFTWARE. #include "dix/input_priv.h" #include "os/audit.h" #include "os/client_priv.h" -#include "os/ddx_priv.h" #include "os/fmt.h" #include "os/osdep.h" +#include "os/osdep.h" + +#include "os/audit.h" +#include "os/fmt.h" + +#include "input.h" #include "opaque.h" #include "osdep.h" diff --git a/os/osdep.h b/os/osdep.h index c8702855a..2d12c5089 100644 --- a/os/osdep.h +++ b/os/osdep.h @@ -188,7 +188,6 @@ void ListenToAllClients(void); /* allow DDX to force using another clock */ void ForceClockId(clockid_t forced_clockid); -Bool WaitForSomething(Bool clients_are_ready); void CloseDownConnection(ClientPtr client); extern int LimitClients; diff --git a/os/utils.c b/os/utils.c index bc62d37df..2a847e2c3 100644 --- a/os/utils.c +++ b/os/utils.c @@ -95,6 +95,7 @@ __stdcall unsigned long GetTickCount(void); #include #include /* for isspace */ #include + #include /* for malloc() */ #if defined(TCPCONN) @@ -107,8 +108,8 @@ __stdcall unsigned long GetTickCount(void); #include "dix/input_priv.h" #include "os/auth.h" #include "os/cmdline.h" -#include "os/ddx_priv.h" #include "os/serverlock.h" +#include "os/osdep.h" #include "dixstruct.h" #include "xkbsrv.h" @@ -184,6 +185,8 @@ Bool noGEExtension = FALSE; Bool CoreDump; +Bool enableIndirectGLX = FALSE; + Bool AllowByteSwappedClients = FALSE; #ifdef XINERAMA From 9b5ab4f6da1e6c67997e4e7d44e99de5fff8a21c Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:23:19 +0100 Subject: [PATCH 35/40] Revert "dix: unexport global variables" This reverts commit 040e41c7e9325f27817037f814b5f7107b5d6472. --- Xext/bigreq.c | 6 ++---- dix/dispatch.c | 4 ++++ dix/dix_priv.h | 12 ------------ dix/globals.c | 4 +--- hw/xwayland/xwayland.c | 1 - include/dix.h | 17 ++++++++++++++--- os/WaitFor.c | 4 ++-- os/io.c | 1 + os/utils.c | 1 + xfixes/disconnect.c | 2 -- 10 files changed, 25 insertions(+), 27 deletions(-) diff --git a/Xext/bigreq.c b/Xext/bigreq.c index 2a3012cf7..ae1ad2ed9 100644 --- a/Xext/bigreq.c +++ b/Xext/bigreq.c @@ -30,14 +30,12 @@ from The Open Group. #include #include -#include - -#include "dix/dix_priv.h" - #include "misc.h" #include "os.h" #include "dixstruct.h" +#include "dix_priv.h" #include "extnsionst.h" +#include #include "opaque.h" #include "extinit_priv.h" diff --git a/dix/dispatch.c b/dix/dispatch.c index 15dbcc80c..0a9c2dc20 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -100,6 +100,9 @@ Equipment Corporation. #include #include +#include "dix/registry_priv.h" + +#include "windowstr.h" #include #include @@ -117,6 +120,7 @@ Equipment Corporation. #include "windowstr.h" #include "dixfontstr.h" +#include "dix_priv.h" #include "gcstruct.h" #include "selection.h" #include "colormapst.h" diff --git a/dix/dix_priv.h b/dix/dix_priv.h index bb2773a24..683feac9a 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -29,21 +29,9 @@ #define MAX_BIG_REQUEST_SIZE 4194303 extern long maxBigRequestSize; -extern char dispatchExceptionAtReset; -extern int terminateDelay; -extern Bool touchEmulatePointer; - -extern HWEventQueuePtr checkForInput[2]; - /* -retro mode */ extern Bool party_like_its_1989; -static inline _X_NOTSAN Bool -InputCheckPending(void) -{ - return (*checkForInput[0] != *checkForInput[1]); -} - void ClearWorkQueue(void); void ProcessWorkQueue(void); void ProcessWorkQueueZombies(void); diff --git a/dix/globals.c b/dix/globals.c index 309b67a0c..b92476c7a 100644 --- a/dix/globals.c +++ b/dix/globals.c @@ -48,15 +48,13 @@ SOFTWARE. #include #include - -#include "dix/dix_priv.h" - #include "misc.h" #include "windowstr.h" #include "scrnintstr.h" #include "input.h" #include "dixfont.h" #include "dixstruct.h" +#include "dix_priv.h" #include "os.h" ScreenInfo screenInfo; diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 1ff032287..426aa4edf 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -35,7 +35,6 @@ #include #include -#include "dix/dix_priv.h" #include "dix/screenint_priv.h" #include "os/cmdline.h" #include "os/client_priv.h" diff --git a/include/dix.h b/include/dix.h index 65e66e06c..c81480624 100644 --- a/include/dix.h +++ b/include/dix.h @@ -130,15 +130,26 @@ typedef struct _WorkQueue *WorkQueuePtr; extern _X_EXPORT ClientPtr clients[MAXCLIENTS]; extern _X_EXPORT ClientPtr serverClient; extern _X_EXPORT int currentMaxClients; +extern _X_EXPORT char dispatchExceptionAtReset; +extern _X_EXPORT int terminateDelay; +extern _X_EXPORT Bool touchEmulatePointer; + +typedef int HWEventQueueType; +typedef HWEventQueueType *HWEventQueuePtr; + +extern _X_EXPORT HWEventQueuePtr checkForInput[2]; + +static inline _X_NOTSAN Bool +InputCheckPending(void) +{ + return (*checkForInput[0] != *checkForInput[1]); +} typedef struct _TimeStamp { CARD32 months; /* really ~49.7 days */ CARD32 milliseconds; } TimeStamp; -typedef int HWEventQueueType; -typedef HWEventQueueType *HWEventQueuePtr; - /* dispatch.c */ extern _X_EXPORT void SetInputCheck(HWEventQueuePtr /*c0 */ , HWEventQueuePtr /*c1 */ ); diff --git a/os/WaitFor.c b/os/WaitFor.c index e7cbf81e0..aa307ba55 100644 --- a/os/WaitFor.c +++ b/os/WaitFor.c @@ -54,12 +54,12 @@ SOFTWARE. #include -#include -#include #ifdef WIN32 #include #endif #include /* for strings, fcntl, time */ +#include +#include #include #include "dix/dix_priv.h" diff --git a/os/io.c b/os/io.c index 167b40a72..9438cd722 100644 --- a/os/io.c +++ b/os/io.c @@ -80,6 +80,7 @@ SOFTWARE. #include "os.h" #include "opaque.h" #include "dixstruct.h" +#include "dix_priv.h" #include "misc.h" CallbackListPtr ReplyCallback; diff --git a/os/utils.c b/os/utils.c index 2a847e2c3..d2cb23ada 100644 --- a/os/utils.c +++ b/os/utils.c @@ -112,6 +112,7 @@ __stdcall unsigned long GetTickCount(void); #include "os/osdep.h" #include "dixstruct.h" +#include "dix_priv.h" #include "xkbsrv.h" #include "picture.h" #include "miinitext.h" diff --git a/xfixes/disconnect.c b/xfixes/disconnect.c index 41be12d95..4bd93fb61 100644 --- a/xfixes/disconnect.c +++ b/xfixes/disconnect.c @@ -44,8 +44,6 @@ #include -#include "dix/dix_priv.h" - #include "xfixesint.h" #include "opaque.h" From 8985398948a6380fd30f1f0601341fef0aa4800e Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:30:06 +0100 Subject: [PATCH 36/40] Revert "mi: unexport miPointerWarpCursor()" This reverts commit 6c04f94f3bcae1833d10c7f30312218a0fdcf095. --- hw/kdrive/ephyr/ephyr.c | 1 + hw/vfb/InitOutput.c | 1 - hw/xfree86/common/xf86Cursor.c | 1 - hw/xnest/Screen.c | 1 - hw/xquartz/xpr/xprCursor.c | 2 -- hw/xwin/wincursor.c | 3 --- mi/mipointer.h | 6 ++++++ mi/mipointer_priv.h | 2 -- 8 files changed, 7 insertions(+), 10 deletions(-) diff --git a/hw/kdrive/ephyr/ephyr.c b/hw/kdrive/ephyr/ephyr.c index 1971cf431..069270219 100644 --- a/hw/kdrive/ephyr/ephyr.c +++ b/hw/kdrive/ephyr/ephyr.c @@ -30,6 +30,7 @@ #include "mi/mipointer_priv.h" #include "os/client_priv.h" +#include "os/osdep.h" #include "ephyr.h" #include "inputstr.h" diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index f60f1f8a3..233e54b57 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -39,7 +39,6 @@ from The Open Group. #include "dix/colormap_priv.h" #include "dix/dix_priv.h" #include "dix/screenint_priv.h" -#include "mi/mipointer_priv.h" #include "os/cmdline.h" #include "os/osdep.h" diff --git a/hw/xfree86/common/xf86Cursor.c b/hw/xfree86/common/xf86Cursor.c index 8a3b5c778..c663310d5 100644 --- a/hw/xfree86/common/xf86Cursor.c +++ b/hw/xfree86/common/xf86Cursor.c @@ -34,7 +34,6 @@ #include #include "dix/input_priv.h" -#include "mi/mipointer_priv.h" #include "cursor.h" #include "mipointer.h" diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index a41c5b341..4c7ebd95b 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -19,7 +19,6 @@ is" without express or implied warranty. #include "mi/mi.h" #include "mi/mi_priv.h" -#include "mi/mipointer_priv.h" #include "scrnintstr.h" #include "dix.h" diff --git a/hw/xquartz/xpr/xprCursor.c b/hw/xquartz/xpr/xprCursor.c index 5b0ad8a33..22b52344d 100644 --- a/hw/xquartz/xpr/xprCursor.c +++ b/hw/xquartz/xpr/xprCursor.c @@ -38,8 +38,6 @@ #include "darwinEvents.h" #include -#include "mi/mipointer_priv.h" - #include "mi.h" #include "scrnintstr.h" #include "cursorstr.h" diff --git a/hw/xwin/wincursor.c b/hw/xwin/wincursor.c index 6b42c990e..3fc050bfa 100644 --- a/hw/xwin/wincursor.c +++ b/hw/xwin/wincursor.c @@ -36,9 +36,6 @@ #endif #include "win.h" #include "winmsg.h" - -#include "mi/mipointer_priv.h" - #include #include #include diff --git a/mi/mipointer.h b/mi/mipointer.h index ba1710a25..2b5851dd9 100644 --- a/mi/mipointer.h +++ b/mi/mipointer.h @@ -77,6 +77,12 @@ extern _X_EXPORT Bool miDCInitialize(ScreenPtr /*pScreen */ , miPointerScreenFuncPtr /*screenFuncs */ ); +extern _X_EXPORT void miPointerWarpCursor(DeviceIntPtr /*pDev */ , + ScreenPtr /*pScreen */ , + int /*x */ , + int /*y */ + ); + extern _X_EXPORT ScreenPtr miPointerGetScreen(DeviceIntPtr pDev); diff --git a/mi/mipointer_priv.h b/mi/mipointer_priv.h index cc4ce9940..6c61fdc22 100644 --- a/mi/mipointer_priv.h +++ b/mi/mipointer_priv.h @@ -8,10 +8,8 @@ #include #include "dix/screenint_priv.h" -#include "include/input.h" #include "mi/mipointer.h" -void miPointerWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); void miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y); void miPointerUpdateSprite(DeviceIntPtr pDev); From b3d6c2312033242bdc5950c467e5aecb0a827b3d Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:45:53 +0100 Subject: [PATCH 37/40] Revert "os: unexport command line args handling functions" This reverts commit 389b5282037a8d0d168ce8b23229b739b8b21632. --- dix/main.c | 1 - hw/kdrive/src/kdrive.c | 1 - hw/kdrive/src/kinput.c | 2 - hw/vfb/InitOutput.c | 1 - hw/xfree86/common/xf86Init.c | 1 - hw/xfree86/os-support/bsd/bsd_init.c | 2 - hw/xfree86/os-support/linux/lnx_init.c | 3 +- hw/xfree86/os-support/solaris/sun_init.c | 2 - include/os.h | 75 ++++++++++++++++++++++++ os/auth.h | 28 --------- os/cmdline.h | 20 ------- os/utils.c | 1 - xkb/xkbInit.c | 1 - 13 files changed, 76 insertions(+), 62 deletions(-) delete mode 100644 os/cmdline.h diff --git a/dix/main.c b/dix/main.c index edaf531b2..6bd310c70 100644 --- a/dix/main.c +++ b/dix/main.c @@ -93,7 +93,6 @@ Equipment Corporation. #include "os/audit.h" #include "os/auth.h" #include "os/client_priv.h" -#include "os/cmdline.h" #include "os/osdep.h" #include "os/screensaver.h" diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index e465f0f9a..8c19face1 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -24,7 +24,6 @@ #include "config/hotplug_priv.h" #include "dix/screenint_priv.h" -#include "os/cmdline.h" #include "kdrive.h" #include diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 3ee06203f..2c220fa3a 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -53,8 +53,6 @@ #include "inpututils.h" #include "optionstr.h" -#include "os/cmdline.h" - #if defined(CONFIG_UDEV) || defined(CONFIG_HAL) #include #endif diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 233e54b57..9ca94e6ea 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -39,7 +39,6 @@ from The Open Group. #include "dix/colormap_priv.h" #include "dix/dix_priv.h" #include "dix/screenint_priv.h" -#include "os/cmdline.h" #include "os/osdep.h" #include "scrnintstr.h" diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 906c8ee58..7c003efb5 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -55,7 +55,6 @@ #include "config/hotplug_priv.h" #include "dix/input_priv.h" #include "dix/screenint_priv.h" -#include "os/cmdline.h" #include "os/osdep.h" #include "servermd.h" diff --git a/hw/xfree86/os-support/bsd/bsd_init.c b/hw/xfree86/os-support/bsd/bsd_init.c index 6dafd410c..2f244d207 100644 --- a/hw/xfree86/os-support/bsd/bsd_init.c +++ b/hw/xfree86/os-support/bsd/bsd_init.c @@ -29,8 +29,6 @@ #include -#include "os/cmdline.h" - #include "compiler.h" #include "xf86.h" #include "xf86Priv.h" diff --git a/hw/xfree86/os-support/linux/lnx_init.c b/hw/xfree86/os-support/linux/lnx_init.c index 126371aeb..90ef01c9a 100644 --- a/hw/xfree86/os-support/linux/lnx_init.c +++ b/hw/xfree86/os-support/linux/lnx_init.c @@ -31,10 +31,9 @@ #include #include -#include "os/cmdline.h" - #include "compiler.h" #include "linux.h" + #include "xf86.h" #include "xf86Priv.h" #include "xf86_os_support.h" diff --git a/hw/xfree86/os-support/solaris/sun_init.c b/hw/xfree86/os-support/solaris/sun_init.c index 4e91d3cfd..4c60bf3bb 100644 --- a/hw/xfree86/os-support/solaris/sun_init.c +++ b/hw/xfree86/os-support/solaris/sun_init.c @@ -29,8 +29,6 @@ #include #include -#include "../../../../os/cmdline.h" - #include "xf86.h" #include "xf86Priv.h" #include "xf86_os_support.h" diff --git a/include/os.h b/include/os.h index d3a024704..244481351 100644 --- a/include/os.h +++ b/include/os.h @@ -143,6 +143,14 @@ extern _X_EXPORT void TimerFree(OsTimerPtr /* pTimer */ ); extern _X_EXPORT void GiveUp(int /*sig */ ); +extern _X_EXPORT void UseMsg(void); + +extern _X_EXPORT void ProcessCommandLine(int /*argc */ , char * /*argv */ []); + +extern _X_EXPORT int set_font_authorizations(char **authorizations, + int *authlen, + void *client); + /* * This function malloc(3)s buffer, terminating the server if there is not * enough memory. @@ -250,6 +258,66 @@ OsAbort(void) extern _X_EXPORT Bool PrivsElevated(void); +extern _X_EXPORT void +CheckUserParameters(int argc, char **argv, char **envp); +extern _X_EXPORT void +CheckUserAuthorization(void); + +extern _X_EXPORT int +AddHost(ClientPtr /*client */ , + int /*family */ , + unsigned /*length */ , + const void * /*pAddr */ ); + +extern _X_EXPORT Bool +ForEachHostInFamily(int family, + Bool (*func)( + unsigned char *addr, + short len, + void *closure), + void *closure); + +extern _X_EXPORT int +RemoveHost(ClientPtr client, + int family, + unsigned length, + void *pAddr); + +extern _X_EXPORT int +GetHosts(void ** /*data */ , + int * /*pnHosts */ , + int * /*pLen */ , + BOOL * /*pEnabled */ ); + +typedef struct sockaddr *sockaddrPtr; + +extern _X_EXPORT int +InvalidHost(sockaddrPtr /*saddr */ , int /*len */ , ClientPtr client); + +#define LCC_UID_SET (1 << 0) +#define LCC_GID_SET (1 << 1) +#define LCC_PID_SET (1 << 2) +#define LCC_ZID_SET (1 << 3) + +typedef struct { + int fieldsSet; /* Bit mask of fields set */ + int euid; /* Effective uid */ + int egid; /* Primary effective group id */ + int nSuppGids; /* Number of supplementary group ids */ + int *pSuppGids; /* Array of supplementary group ids */ + int pid; /* Process id */ + int zoneid; /* Only set on Solaris 10 & later */ +} LocalClientCredRec; + +extern _X_EXPORT int +GetLocalClientCreds(ClientPtr, LocalClientCredRec **); + +extern _X_EXPORT void +FreeLocalClientCreds(LocalClientCredRec *); + +extern _X_EXPORT int +ChangeAccessControl(ClientPtr /*client */ , int /*fEnabled */ ); + extern _X_EXPORT int GetClientFd(ClientPtr); @@ -259,6 +327,13 @@ ClientIsLocal(ClientPtr client); extern _X_EXPORT int ddxProcessArgument(int /*argc */ , char * /*argv */ [], int /*i */ ); +#define CHECK_FOR_REQUIRED_ARGUMENTS(num) \ + do if (((i + num) >= argc) || (!argv[i + num])) { \ + UseMsg(); \ + FatalError("Required argument to %s not specified\n", argv[i]); \ + } while (0) + + extern _X_EXPORT void ddxUseMsg(void); diff --git a/os/auth.h b/os/auth.h index 5d23e9ada..52d5f8b39 100644 --- a/os/auth.h +++ b/os/auth.h @@ -26,28 +26,11 @@ typedef int (*AuthRemCFunc) (AuthRemCArgs); #define AuthRstCArgs void typedef int (*AuthRstCFunc) (AuthRstCArgs); -int set_font_authorizations(char **authorizations, - int *authlen, - void *client); - #define LCC_UID_SET (1 << 0) #define LCC_GID_SET (1 << 1) #define LCC_PID_SET (1 << 2) #define LCC_ZID_SET (1 << 3) -typedef struct { - int fieldsSet; /* Bit mask of fields set */ - int euid; /* Effective uid */ - int egid; /* Primary effective group id */ - int nSuppGids; /* Number of supplementary group ids */ - int *pSuppGids; /* Array of supplementary group ids */ - int pid; /* Process id */ - int zoneid; /* Only set on Solaris 10 & later */ -} LocalClientCredRec; - -int GetLocalClientCreds(ClientPtr, LocalClientCredRec **); -void FreeLocalClientCreds(LocalClientCredRec *); - void EnableLocalAccess(void); void DisableLocalAccess(void); @@ -87,17 +70,8 @@ XID GenerateAuthorization(unsigned int name_length, void RegisterAuthorizations(void); -void CheckUserAuthorization(void); - typedef struct sockaddr *sockaddrPtr; -int AddHost(ClientPtr client, int family, unsigned length, const void *pAddr); -Bool ForEachHostInFamily(int family, - Bool (*func)(unsigned char *addr, short len, void *closure), - void *closure); -int RemoveHost(ClientPtr client, int family, unsigned length, void *pAddr); -int GetHosts(void **data, int *pnHosts, int *pLen, BOOL *pEnabled); -int InvalidHost(sockaddrPtr saddr, int len, ClientPtr client); void AddLocalHosts(void); void ResetHosts(const char *display); @@ -107,8 +81,6 @@ void DefineSelf(int fd); /* check whether given addr belongs to ourself */ void AugmentSelf(void *from, int len); -int ChangeAccessControl(ClientPtr client, int fEnabled); - void AccessUsingXdmcp(void); extern Bool defeatAccessControl; diff --git a/os/cmdline.h b/os/cmdline.h deleted file mode 100644 index 9a4a19467..000000000 --- a/os/cmdline.h +++ /dev/null @@ -1,20 +0,0 @@ -/* SPDX-License-Identifier: MIT OR X11 - * - * Copyright © 2024 Enrico Weigelt, metux IT consult - */ -#ifndef _XSERVER_OS_CMDLINE_H -#define _XSERVER_OS_CMDLINE_H - -#include "include/os.h" - -#define CHECK_FOR_REQUIRED_ARGUMENTS(num) \ - do if (((i + num) >= argc) || (!argv[i + num])) { \ - UseMsg(); \ - FatalError("Required argument to %s not specified\n", argv[i]); \ - } while (0) - -void UseMsg(void); -void ProcessCommandLine(int argc, char * argv[]); -void CheckUserParameters(int argc, char **argv, char **envp); - -#endif /* _XSERVER_OS_CMELINE_H */ diff --git a/os/utils.c b/os/utils.c index d2cb23ada..50fcd5035 100644 --- a/os/utils.c +++ b/os/utils.c @@ -107,7 +107,6 @@ __stdcall unsigned long GetTickCount(void); #include "dix/dix_priv.h" #include "dix/input_priv.h" #include "os/auth.h" -#include "os/cmdline.h" #include "os/serverlock.h" #include "os/osdep.h" diff --git a/xkb/xkbInit.c b/xkb/xkbInit.c index 2819935eb..b92993a9b 100644 --- a/xkb/xkbInit.c +++ b/xkb/xkbInit.c @@ -39,7 +39,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include -#include "os/cmdline.h" #include "xkb/xkbsrv_priv.h" #include "misc.h" From b7af42d3c2090524ca96ceb3e887be79b26dd601 Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:50:59 +0100 Subject: [PATCH 38/40] Revert "dix: unexport AddScreen() and AddGPUScreen()" This reverts commit 27b83c4cd0c3dab27101a8e9dd25b7bd6a206f3d. --- dix/colormap_priv.h | 1 - dix/dispatch.c | 1 - dix/screenint_priv.h | 26 -------------------------- hw/vfb/InitOutput.c | 1 - hw/xfree86/common/xf86Init.c | 2 +- hw/xfree86/common/xf86platformBus.c | 1 - hw/xfree86/modes/xf86RandR12.c | 1 - hw/xnest/Init.c | 1 - include/screenint.h | 16 ++++++++++++++++ mi/mipointer_priv.h | 1 - 10 files changed, 17 insertions(+), 34 deletions(-) delete mode 100644 dix/screenint_priv.h diff --git a/dix/colormap_priv.h b/dix/colormap_priv.h index 266e44793..c7d879c79 100644 --- a/dix/colormap_priv.h +++ b/dix/colormap_priv.h @@ -8,7 +8,6 @@ #include #include -#include "dix/screenint_priv.h" #include "include/colormap.h" #include "include/dix.h" #include "include/window.h" diff --git a/dix/dispatch.c b/dix/dispatch.c index 0a9c2dc20..ac01b52ee 100644 --- a/dix/dispatch.c +++ b/dix/dispatch.c @@ -111,7 +111,6 @@ Equipment Corporation. #include "dix/input_priv.h" #include "dix/gc_priv.h" #include "dix/registry_priv.h" -#include "dix/screenint_priv.h" #include "include/resource.h" #include "os/auth.h" #include "os/client_priv.h" diff --git a/dix/screenint_priv.h b/dix/screenint_priv.h deleted file mode 100644 index 616cfbfb6..000000000 --- a/dix/screenint_priv.h +++ /dev/null @@ -1,26 +0,0 @@ -/* SPDX-License-Identifier: MIT OR X11 - * - * Copyright © 2024 Enrico Weigelt, metux IT consult - * Copyright © 1987, 1998 The Open Group - */ -#ifndef _XSERVER_DIX_SCREENINT_PRIV_H -#define _XSERVER_DIX_SCREENINT_PRIV_H - -#include - -#include "screenint.h" - -typedef Bool (*ScreenInitProcPtr)(ScreenPtr pScreen, int argc, char **argv); - -int AddScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); -int AddGPUScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); - -void RemoveGPUScreen(ScreenPtr pScreen); - -void AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr newScreen); -void DetachUnboundGPU(ScreenPtr unbound); - -void AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen); -void DetachOffloadGPU(ScreenPtr slave); - -#endif /* _XSERVER_DIX_SCREENINT_PRIV_H */ diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c index 9ca94e6ea..fff1a6403 100644 --- a/hw/vfb/InitOutput.c +++ b/hw/vfb/InitOutput.c @@ -38,7 +38,6 @@ from The Open Group. #include "dix/colormap_priv.h" #include "dix/dix_priv.h" -#include "dix/screenint_priv.h" #include "os/osdep.h" #include "scrnintstr.h" diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c index 7c003efb5..052a063ae 100644 --- a/hw/xfree86/common/xf86Init.c +++ b/hw/xfree86/common/xf86Init.c @@ -54,9 +54,9 @@ #include "config/dbus-core.h" #include "config/hotplug_priv.h" #include "dix/input_priv.h" -#include "dix/screenint_priv.h" #include "os/osdep.h" +#include "input.h" #include "servermd.h" #include "windowstr.h" #include "scrnintstr.h" diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 2962c8b21..63c1be2c9 100644 --- a/hw/xfree86/common/xf86platformBus.c +++ b/hw/xfree86/common/xf86platformBus.c @@ -38,7 +38,6 @@ #include #include "config/hotplug_priv.h" -#include "dix/screenint_priv.h" #include "os.h" #include "systemd-logind.h" diff --git a/hw/xfree86/modes/xf86RandR12.c b/hw/xfree86/modes/xf86RandR12.c index cdc4d0c7f..78ef815c0 100644 --- a/hw/xfree86/modes/xf86RandR12.c +++ b/hw/xfree86/modes/xf86RandR12.c @@ -27,7 +27,6 @@ #include #include "dix/input_priv.h" -#include "dix/screenint_priv.h" #include "xf86.h" #include "os.h" diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 1f268b64f..d092f9363 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -20,7 +20,6 @@ is" without express or implied warranty. #include #include -#include "dix/screenint_priv.h" #include "os/osdep.h" #include "screenint.h" diff --git a/include/screenint.h b/include/screenint.h index fc313042d..9a095d5ac 100644 --- a/include/screenint.h +++ b/include/screenint.h @@ -56,6 +56,22 @@ typedef struct _Screen *ScreenPtr; extern _X_EXPORT void AttachOutputGPU(ScreenPtr pScreen, ScreenPtr newScreen); extern _X_EXPORT void DetachOutputGPU(ScreenPtr output); +typedef Bool (*ScreenInitProcPtr)(ScreenPtr pScreen, int argc, char **argv); +extern _X_EXPORT int AddScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); +extern _X_EXPORT int AddGPUScreen(ScreenInitProcPtr pfnInit, int argc, char **argv); + +extern _X_EXPORT void RemoveGPUScreen(ScreenPtr pScreen); + +extern _X_EXPORT void +AttachUnboundGPU(ScreenPtr pScreen, ScreenPtr newScreen); +extern _X_EXPORT void +DetachUnboundGPU(ScreenPtr unbound); + +extern _X_EXPORT void +AttachOffloadGPU(ScreenPtr pScreen, ScreenPtr newScreen); + +extern _X_EXPORT void +DetachOffloadGPU(ScreenPtr slave); typedef struct _ColormapRec *ColormapPtr; diff --git a/mi/mipointer_priv.h b/mi/mipointer_priv.h index 6c61fdc22..fcd40e509 100644 --- a/mi/mipointer_priv.h +++ b/mi/mipointer_priv.h @@ -7,7 +7,6 @@ #include -#include "dix/screenint_priv.h" #include "mi/mipointer.h" void miPointerSetScreen(DeviceIntPtr pDev, int screen_num, int x, int y); From 2dab7090307e185247c75e0415925ba2ce7fd631 Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 20:55:59 +0100 Subject: [PATCH 39/40] Revert "include: split out non-exported prototypes to dix_priv.h" This reverts commit f17bc7e24dd0e5a68da3a993d439c667524e3d8a. --- Xi/allowev.c | 1 + Xi/extinit.c | 4 + Xi/grabdev.c | 8 +- Xi/setfocus.c | 9 +- Xi/xichangehierarchy.c | 5 + Xi/xigrabdev.c | 2 + Xi/xisetdevfocus.c | 6 +- dix/cursor.c | 3 - dix/display.c | 1 + dix/dix_priv.h | 149 ------------------------ dix/enterleave.c | 1 - dix/eventconvert.c | 1 - dix/gestures.c | 1 + hw/kdrive/ephyr/ephyrinit.c | 3 - hw/kdrive/src/kdrive.c | 1 - hw/kdrive/src/kinput.c | 1 - hw/xfree86/common/xf86DGA.c | 7 +- hw/xfree86/common/xf86Xinput.c | 4 +- hw/xfree86/modes/xf86Rotate.c | 9 +- hw/xquartz/darwin.c | 1 - hw/xwayland/xwayland-window.c | 2 +- hw/xwayland/xwayland.c | 3 - hw/xwin/InitOutput.c | 2 - hw/xwin/winkeybd.c | 4 +- hw/xwin/winprocarg.c | 1 - include/dix.h | 202 +++++++++++++++++++++++++++++++-- mi/midispcur.c | 3 +- test/bigreq/request-length.c | 3 +- test/simple-xinit.c | 3 +- xkb/xkbActions.c | 6 +- 30 files changed, 241 insertions(+), 205 deletions(-) diff --git a/Xi/allowev.c b/Xi/allowev.c index 0753a033c..70f688ca3 100644 --- a/Xi/allowev.c +++ b/Xi/allowev.c @@ -60,6 +60,7 @@ SOFTWARE. #include "dix/input_priv.h" #include "exglobals.h" + #include "allowev.h" #include "dixevents.h" diff --git a/Xi/extinit.c b/Xi/extinit.c index f6f21f30d..331556da3 100644 --- a/Xi/extinit.c +++ b/Xi/extinit.c @@ -53,6 +53,9 @@ SOFTWARE. #include +#include "inputstr.h" +#include "gcstruct.h" /* pointer for extnsionst.h */ +#include "extnsionst.h" /* extension entry */ #include #include #include @@ -65,6 +68,7 @@ SOFTWARE. #include "gcstruct.h" /* pointer for extnsionst.h */ #include "extnsionst.h" /* extension entry */ #include "geext.h" /* extension interfaces for ge */ + #include "dixevents.h" #include "extinit_priv.h" #include "exglobals.h" diff --git a/Xi/grabdev.c b/Xi/grabdev.c index 9bae237d1..2919479c6 100644 --- a/Xi/grabdev.c +++ b/Xi/grabdev.c @@ -52,15 +52,13 @@ SOFTWARE. #include -#include -#include - -#include "dix/dix_priv.h" - #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ +#include +#include #include "exglobals.h" #include "dixevents.h" /* GrabDevice */ + #include "grabdev.h" extern XExtEventInfo EventInfo[]; diff --git a/Xi/setfocus.c b/Xi/setfocus.c index 16f969436..fd855b56c 100644 --- a/Xi/setfocus.c +++ b/Xi/setfocus.c @@ -52,16 +52,15 @@ SOFTWARE. #include +#include "windowstr.h" /* focus struct */ +#include "inputstr.h" /* DeviceIntPtr */ #include #include -#include "windowstr.h" /* focus struct */ -#include "inputstr.h" /* DeviceIntPtr */ - -#include "dix/dix_priv.h" - #include "dixevents.h" + #include "exglobals.h" + #include "setfocus.h" /*********************************************************************** diff --git a/Xi/xichangehierarchy.c b/Xi/xichangehierarchy.c index c49fb4cfc..1607f8050 100644 --- a/Xi/xichangehierarchy.c +++ b/Xi/xichangehierarchy.c @@ -45,12 +45,17 @@ #include "inputstr.h" /* DeviceIntPtr */ #include "windowstr.h" /* window structure */ #include "scrnintstr.h" /* screen structure */ +#include +#include +#include #include "extnsionst.h" #include "exglobals.h" #include "misc.h" #include "xace.h" #include "xiquerydevice.h" /* for GetDeviceUse */ + #include "xkbsrv.h" + #include "xichangehierarchy.h" #include "xibarriers.h" diff --git a/Xi/xigrabdev.c b/Xi/xigrabdev.c index f7fea9cf3..038bc954f 100644 --- a/Xi/xigrabdev.c +++ b/Xi/xigrabdev.c @@ -31,6 +31,8 @@ #include +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include #include diff --git a/Xi/xisetdevfocus.c b/Xi/xisetdevfocus.c index bf2103fdc..ccfd2e7db 100644 --- a/Xi/xisetdevfocus.c +++ b/Xi/xisetdevfocus.c @@ -30,13 +30,11 @@ #include +#include "inputstr.h" /* DeviceIntPtr */ +#include "windowstr.h" /* window structure */ #include #include -#include "dix/dix_priv.h" - -#include "inputstr.h" /* DeviceIntPtr */ -#include "windowstr.h" /* window structure */ #include "exglobals.h" /* BadDevice */ #include "xisetdevfocus.h" diff --git a/dix/cursor.c b/dix/cursor.c index 6edd1f307..15b201c1a 100644 --- a/dix/cursor.c +++ b/dix/cursor.c @@ -48,9 +48,6 @@ SOFTWARE. #include #include - -#include "dix/dix_priv.h" - #include "servermd.h" #include "scrnintstr.h" #include "dixstruct.h" diff --git a/dix/display.c b/dix/display.c index 5e8cf7bc5..4fbb026bc 100644 --- a/dix/display.c +++ b/dix/display.c @@ -7,6 +7,7 @@ #include "dix/dix_priv.h" #include "include/dix.h" #include "include/screenint.h" +#include "opaque.h" const char *display = "0"; int displayfd = -1; diff --git a/dix/dix_priv.h b/dix/dix_priv.h index 683feac9a..f4ef8faa0 100644 --- a/dix/dix_priv.h +++ b/dix/dix_priv.h @@ -15,14 +15,9 @@ #include #include -#include -#include "include/callback.h" -#include "include/cursor.h" #include "include/dix.h" -#include "include/events.h" #include "include/gc.h" -#include "include/input.h" #include "include/window.h" /* server setting: maximum size for big requests */ @@ -74,148 +69,4 @@ int dixLookupClient(ClientPtr *result, ClientPtr client, Mask access_mode); -Bool CreateConnectionBlock(void); - -void EnableLimitedSchedulingLatency(void); - -void DisableLimitedSchedulingLatency(void); - -int dix_main(int argc, char *argv[], char *envp[]); - -void SetMaskForEvent(int deviceid, Mask mask, int event); - -void EnqueueEvent(InternalEvent *ev, DeviceIntPtr device); - -void PlayReleasedEvents(void); - -void ActivatePointerGrab(DeviceIntPtr mouse, - GrabPtr grab, - TimeStamp time, - Bool autoGrab); - -void DeactivatePointerGrab(DeviceIntPtr mouse); - -void ActivateKeyboardGrab(DeviceIntPtr keybd, - GrabPtr grab, - TimeStamp time, - Bool passive); - -void DeactivateKeyboardGrab(DeviceIntPtr keybd); - -BOOL ActivateFocusInGrab(DeviceIntPtr dev, WindowPtr old, WindowPtr win); - -void AllowSome(ClientPtr client, - TimeStamp time, - DeviceIntPtr thisDev, - int newState); - -void ReleaseActiveGrabs(ClientPtr client); - -GrabPtr CheckPassiveGrabsOnWindow(WindowPtr pWin, - DeviceIntPtr device, - InternalEvent *event, - BOOL checkCore, - BOOL activate); - -int DeliverDeviceEvents(WindowPtr pWin, - InternalEvent *event, - GrabPtr grab, - WindowPtr stopAt, - DeviceIntPtr dev); - -int DeliverOneGrabbedEvent(InternalEvent *event, - DeviceIntPtr dev, - enum InputLevel level); - -void DeliverTouchEvents(DeviceIntPtr dev, - TouchPointInfoPtr ti, - InternalEvent *ev, - XID resource); - -Bool DeliverGestureEventToOwner(DeviceIntPtr dev, - GestureInfoPtr gi, - InternalEvent *ev); - -void InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin); -void FreeSprite(DeviceIntPtr pDev); -void UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen); - -Bool CheckDeviceGrabs(DeviceIntPtr device, - InternalEvent *event, - WindowPtr ancestor); - -void DeliverFocusedEvent(DeviceIntPtr keybd, - InternalEvent *event, - WindowPtr window); - -int DeliverGrabbedEvent(InternalEvent *event, - DeviceIntPtr thisDev, - Bool deactivateGrab); - -void FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, - InternalEvent *event); - -void FixKeyState(DeviceEvent *event, DeviceIntPtr keybd); - -void RecalculateDeliverableEvents(WindowPtr pWin); - -void DoFocusEvents(DeviceIntPtr dev, - WindowPtr fromWin, - WindowPtr toWin, - int mode); - -int SetInputFocus(ClientPtr client, - DeviceIntPtr dev, - Window focusID, - CARD8 revertTo, - Time ctime, - Bool followOK); - -int GrabDevice(ClientPtr client, - DeviceIntPtr dev, - unsigned this_mode, - unsigned other_mode, - Window grabWindow, - unsigned ownerEvents, - Time ctime, - GrabMask *mask, - int grabtype, - Cursor curs, - Window confineToWin, - CARD8 *status); - -void InitEvents(void); - -void CloseDownEvents(void); - -void DeleteWindowFromAnyEvents(WindowPtr pWin, Bool freeResources); - -Mask EventMaskForClient(WindowPtr pWin, ClientPtr client); - -Bool CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev); - -int SetClientPointer(ClientPtr client, DeviceIntPtr device); - -Bool IsInterferingGrab(ClientPtr client, DeviceIntPtr dev, xEvent *events); - -int XItoCoreType(int xi_type); - -Bool DevHasCursor(DeviceIntPtr pDev); - -Bool IsPointerEvent(InternalEvent *event); - -Bool IsTouchEvent(InternalEvent *event); - -Bool IsGestureEvent(InternalEvent *event); - -Bool IsGestureBeginEvent(InternalEvent *event); - -Bool IsGestureEndEvent(InternalEvent *event); - -void CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); - -int CorePointerProc(DeviceIntPtr dev, int what); - -int CoreKeyboardProc(DeviceIntPtr dev, int what); - #endif /* _XSERVER_DIX_PRIV_H */ diff --git a/dix/enterleave.c b/dix/enterleave.c index c10d27e96..9c6188ec8 100644 --- a/dix/enterleave.c +++ b/dix/enterleave.c @@ -31,7 +31,6 @@ #include #include -#include "dix/dix_priv.h" #include "dix/eventconvert.h" #include "dix/input_priv.h" diff --git a/dix/eventconvert.c b/dix/eventconvert.c index d805018f8..715bbf716 100644 --- a/dix/eventconvert.c +++ b/dix/eventconvert.c @@ -37,7 +37,6 @@ #include #include -#include "dix/dix_priv.h" #include "dix/eventconvert.h" #include "dix/exevents_priv.h" diff --git a/dix/gestures.c b/dix/gestures.c index 4810ce030..02bdd406e 100644 --- a/dix/gestures.c +++ b/dix/gestures.c @@ -32,6 +32,7 @@ #include "inputstr.h" #include "scrnintstr.h" + #include "eventstr.h" #include "exevents.h" #include "exglobals.h" diff --git a/hw/kdrive/ephyr/ephyrinit.c b/hw/kdrive/ephyr/ephyrinit.c index 9306f3367..b1341e1a4 100644 --- a/hw/kdrive/ephyr/ephyrinit.c +++ b/hw/kdrive/ephyr/ephyrinit.c @@ -25,9 +25,6 @@ #include -#include "dix/dix_priv.h" -#include "os/cmdline.h" -#include "os/ddx_priv.h" #include "os/osdep.h" #include "ephyr.h" diff --git a/hw/kdrive/src/kdrive.c b/hw/kdrive/src/kdrive.c index 8c19face1..fa2848c78 100644 --- a/hw/kdrive/src/kdrive.c +++ b/hw/kdrive/src/kdrive.c @@ -23,7 +23,6 @@ #include #include "config/hotplug_priv.h" -#include "dix/screenint_priv.h" #include "kdrive.h" #include diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c index 2c220fa3a..ebeb34764 100644 --- a/hw/kdrive/src/kinput.c +++ b/hw/kdrive/src/kinput.c @@ -41,7 +41,6 @@ #include "dix/input_priv.h" #include "mi/mi_priv.h" #include "mi/mipointer_priv.h" -#include "os/cmdline.h" #include "xkbsrv.h" #include "XIstubs.h" /* even though we don't use stubs. cute, no? */ diff --git a/hw/xfree86/common/xf86DGA.c b/hw/xfree86/common/xf86DGA.c index 1fbc36a66..98e9b3581 100644 --- a/hw/xfree86/common/xf86DGA.c +++ b/hw/xfree86/common/xf86DGA.c @@ -41,10 +41,8 @@ #include #endif -#include #include #include -#include #include "dix/colormap_priv.h" #include "dix/dix_priv.h" @@ -56,6 +54,7 @@ #include "xf86Priv.h" #include "dgaproc.h" #include "dgaproc_priv.h" +#include #include "colormapst.h" #include "pixmapstr.h" #include "inputstr.h" @@ -67,7 +66,9 @@ #include "exglobals.h" #include "eventstr.h" #include "xf86Extensions.h" + #include "mi.h" + #include "misc.h" #include "dixstruct.h" #include "dixevents.h" @@ -78,6 +79,8 @@ #include "dgaproc.h" #include "protocol-versions.h" +#include + #define DGA_PROTOCOL_OLD_SUPPORT 1 static DevPrivateKeyRec DGAScreenKeyRec; diff --git a/hw/xfree86/common/xf86Xinput.c b/hw/xfree86/common/xf86Xinput.c index 2d310cc58..4baa48cd1 100644 --- a/hw/xfree86/common/xf86Xinput.c +++ b/hw/xfree86/common/xf86Xinput.c @@ -50,14 +50,12 @@ #include #endif -#include /* InputClassMatches */ #include #include #include #include #include -#include "dix/dix_priv.h" #include "dix/ptrveloc_priv.h" #include "dix/input_priv.h" @@ -71,12 +69,14 @@ #include "extinit.h" #include "loaderProcs.h" #include "systemd-logind.h" + #include "exevents.h" /* AddInputDevice */ #include "exglobals.h" #include "eventstr.h" #include "inpututils.h" #include "optionstr.h" +#include /* InputClassMatches */ #ifdef HAVE_FNMATCH_H #include #endif diff --git a/hw/xfree86/modes/xf86Rotate.c b/hw/xfree86/modes/xf86Rotate.c index d94c77cdf..68213ab49 100644 --- a/hw/xfree86/modes/xf86Rotate.c +++ b/hw/xfree86/modes/xf86Rotate.c @@ -28,12 +28,6 @@ #include #include #include -#include -#include -#include - -#include "dix/dix_priv.h" - #include "mi.h" #include "xf86.h" #include "xf86DDC.h" @@ -41,6 +35,9 @@ #include "xf86Crtc.h" #include "xf86Modes.h" #include "xf86RandR12.h" +#include "X11/extensions/render.h" +#include "X11/extensions/dpmsconst.h" +#include "X11/Xatom.h" void xf86RotateCrtcRedisplay(xf86CrtcPtr crtc, PixmapPtr dst_pixmap, diff --git a/hw/xquartz/darwin.c b/hw/xquartz/darwin.c index fcfcd554a..cdeff49ea 100644 --- a/hw/xquartz/darwin.c +++ b/hw/xquartz/darwin.c @@ -34,7 +34,6 @@ #include #include -#include "os/ddx_priv.h" #include "os/osdep.h" #include "os.h" diff --git a/hw/xwayland/xwayland-window.c b/hw/xwayland/xwayland-window.c index af49de8ef..c78d2d761 100644 --- a/hw/xwayland/xwayland-window.c +++ b/hw/xwayland/xwayland-window.c @@ -24,7 +24,7 @@ */ #include - +#include "dix/dix_priv.h" #include #include #include diff --git a/hw/xwayland/xwayland.c b/hw/xwayland/xwayland.c index 426aa4edf..326015a81 100644 --- a/hw/xwayland/xwayland.c +++ b/hw/xwayland/xwayland.c @@ -35,10 +35,7 @@ #include #include -#include "dix/screenint_priv.h" -#include "os/cmdline.h" #include "os/client_priv.h" -#include "os/ddx_priv.h" #include "os/fmt.h" #include "os/osdep.h" #include "os/xserver_poll.h" diff --git a/hw/xwin/InitOutput.c b/hw/xwin/InitOutput.c index 47ec5ba77..d0d20b582 100644 --- a/hw/xwin/InitOutput.c +++ b/hw/xwin/InitOutput.c @@ -32,7 +32,6 @@ from The Open Group. #include #endif -#include "dix/dix_priv.h" #include "os/osdep.h" #include "win.h" @@ -60,7 +59,6 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, DWORD dwFlags, LPTSTR pszPath); #endif -#include "dix/screenint_priv.h" #include "os/osdep.h" #include "winmonitors.h" diff --git a/hw/xwin/winkeybd.c b/hw/xwin/winkeybd.c index 037ab1ecc..00586c25b 100644 --- a/hw/xwin/winkeybd.c +++ b/hw/xwin/winkeybd.c @@ -35,12 +35,10 @@ #include #endif #include "win.h" - -#include "dix/dix_priv.h" - #include "winkeybd.h" #include "winconfig.h" #include "winmsg.h" + #include "xkbsrv.h" /* C does not have a logical XOR operator, so we use a macro instead */ diff --git a/hw/xwin/winprocarg.c b/hw/xwin/winprocarg.c index 9142cc5d0..d7250fb6c 100644 --- a/hw/xwin/winprocarg.c +++ b/hw/xwin/winprocarg.c @@ -35,7 +35,6 @@ from The Open Group. #include #endif -#include "os/cmdline.h" #include "os/osdep.h" #include <../xfree86/common/xorgVersion.h> diff --git a/include/dix.h b/include/dix.h index c81480624..874a63c0b 100644 --- a/include/dix.h +++ b/include/dix.h @@ -171,6 +171,8 @@ extern _X_EXPORT void SendErrorToClient(ClientPtr /*client */ , extern _X_EXPORT void MarkClientException(ClientPtr /*client */ ); +extern _X_HIDDEN Bool CreateConnectionBlock(void); + /* dixutils.c */ extern _X_EXPORT int dixLookupWindow(WindowPtr *result, @@ -198,6 +200,12 @@ extern _X_EXPORT void BlockHandler(void *timeout); extern _X_EXPORT void WakeupHandler(int result); +void +EnableLimitedSchedulingLatency(void); + +void +DisableLimitedSchedulingLatency(void); + typedef void (*ServerBlockHandlerProcPtr) (void *blockData, void *timeout); @@ -271,8 +279,16 @@ InitAtoms(void); extern _X_EXPORT void SetVendorRelease(int release); +int +dix_main(int argc, char *argv[], char *envp[]); + /* events.c */ +extern void +SetMaskForEvent(int /* deviceid */ , + Mask /* mask */ , + int /* event */ ); + extern _X_EXPORT void ConfineToShape(DeviceIntPtr /* pDev */ , RegionPtr /* shape */ , @@ -292,23 +308,63 @@ GetSpriteWindow(DeviceIntPtr pDev); extern _X_EXPORT void NoticeTime(const DeviceIntPtr dev, TimeStamp time); - extern _X_EXPORT void NoticeEventTime(InternalEvent *ev, DeviceIntPtr dev); - extern _X_EXPORT TimeStamp LastEventTime(int deviceid); - extern _X_EXPORT Bool LastEventTimeWasReset(int deviceid); - extern _X_EXPORT void LastEventTimeToggleResetFlag(int deviceid, Bool state); - extern _X_EXPORT void LastEventTimeToggleResetAll(Bool state); +extern void +EnqueueEvent(InternalEvent * /* ev */ , + DeviceIntPtr /* device */ ); +extern void +PlayReleasedEvents(void); + +extern void +ActivatePointerGrab(DeviceIntPtr /* mouse */ , + GrabPtr /* grab */ , + TimeStamp /* time */ , + Bool /* autoGrab */ ); + +extern void +DeactivatePointerGrab(DeviceIntPtr /* mouse */ ); + +extern void +ActivateKeyboardGrab(DeviceIntPtr /* keybd */ , + GrabPtr /* grab */ , + TimeStamp /* time */ , + Bool /* passive */ ); + +extern void +DeactivateKeyboardGrab(DeviceIntPtr /* keybd */ ); + +extern BOOL +ActivateFocusInGrab(DeviceIntPtr /* dev */ , + WindowPtr /* old */ , + WindowPtr /* win */ ); + +extern void +AllowSome(ClientPtr /* client */ , + TimeStamp /* time */ , + DeviceIntPtr /* thisDev */ , + int /* newState */ ); + +extern void +ReleaseActiveGrabs(ClientPtr client); + +extern GrabPtr +CheckPassiveGrabsOnWindow(WindowPtr /* pWin */ , + DeviceIntPtr /* device */ , + InternalEvent * /* event */ , + BOOL /* checkCore */ , + BOOL /* activate */ ); + extern _X_EXPORT int DeliverEventsToWindow(DeviceIntPtr /* pWin */ , WindowPtr /* pWin */ , @@ -322,19 +378,123 @@ DeliverRawEvent(RawDeviceEvent * /* ev */ , DeviceIntPtr /* dev */ ); +extern int +DeliverDeviceEvents(WindowPtr /* pWin */ , + InternalEvent * /* event */ , + GrabPtr /* grab */ , + WindowPtr /* stopAt */ , + DeviceIntPtr /* dev */ ); + +extern int +DeliverOneGrabbedEvent(InternalEvent * /* event */ , + DeviceIntPtr /* dev */ , + enum InputLevel /* level */ ); + +extern void +DeliverTouchEvents(DeviceIntPtr /* dev */ , + TouchPointInfoPtr /* ti */ , + InternalEvent * /* ev */ , + XID /* resource */ ); + +extern Bool +DeliverGestureEventToOwner(DeviceIntPtr dev, GestureInfoPtr gi, + InternalEvent *ev); + +extern void +InitializeSprite(DeviceIntPtr /* pDev */ , + WindowPtr /* pWin */ ); +extern void +FreeSprite(DeviceIntPtr pDev); + +extern void +UpdateSpriteForScreen(DeviceIntPtr /* pDev */ , + ScreenPtr /* pScreen */ ); + extern _X_EXPORT void WindowHasNewCursor(WindowPtr /* pWin */ ); +extern Bool +CheckDeviceGrabs(DeviceIntPtr /* device */ , + InternalEvent * /* event */ , + WindowPtr /* ancestor */ ); + +extern void +DeliverFocusedEvent(DeviceIntPtr /* keybd */ , + InternalEvent * /* event */ , + WindowPtr /* window */ ); + +extern int +DeliverGrabbedEvent(InternalEvent * /* event */ , + DeviceIntPtr /* thisDev */ , + Bool /* deactivateGrab */ ); + +extern void +FreezeThisEventIfNeededForSyncGrab(DeviceIntPtr thisDev, + InternalEvent *event); + +extern void +FixKeyState(DeviceEvent * /* event */ , + DeviceIntPtr /* keybd */ ); + +extern void +RecalculateDeliverableEvents(WindowPtr /* pWin */ ); + extern _X_EXPORT int OtherClientGone(void *value, XID id); +extern void +DoFocusEvents(DeviceIntPtr /* dev */ , + WindowPtr /* fromWin */ , + WindowPtr /* toWin */ , + int /* mode */ ); + +extern int +SetInputFocus(ClientPtr /* client */ , + DeviceIntPtr /* dev */ , + Window /* focusID */ , + CARD8 /* revertTo */ , + Time /* ctime */ , + Bool /* followOK */ ); + +extern int +GrabDevice(ClientPtr /* client */ , + DeviceIntPtr /* dev */ , + unsigned /* this_mode */ , + unsigned /* other_mode */ , + Window /* grabWindow */ , + unsigned /* ownerEvents */ , + Time /* ctime */ , + GrabMask * /* mask */ , + int /* grabtype */ , + Cursor /* curs */ , + Window /* confineToWin */ , + CARD8 * /* status */ ); + +extern void +InitEvents(void); + +extern void +CloseDownEvents(void); + +extern void +DeleteWindowFromAnyEvents(WindowPtr /* pWin */ , + Bool /* freeResources */ ); + +extern Mask +EventMaskForClient(WindowPtr /* pWin */ , + ClientPtr /* client */ ); + extern _X_EXPORT int DeliverEvents(WindowPtr /*pWin */ , xEventPtr /*xE */ , int /*count */ , WindowPtr /*otherParent */ ); +extern Bool +CheckMotion(DeviceEvent * /* ev */ , + DeviceIntPtr /* pDev */ ); + extern _X_EXPORT void WriteEventsToClient(ClientPtr /*pClient */ , int /*count */ , @@ -352,12 +512,21 @@ TryClientEvents(ClientPtr /*client */ , extern _X_EXPORT void WindowsRestructured(void); +extern int +SetClientPointer(ClientPtr /* client */ , + DeviceIntPtr /* device */ ); + extern _X_EXPORT DeviceIntPtr PickPointer(ClientPtr /* client */ ); extern _X_EXPORT DeviceIntPtr PickKeyboard(ClientPtr /* client */ ); +extern Bool +IsInterferingGrab(ClientPtr /* client */ , + DeviceIntPtr /* dev */ , + xEvent * /* events */ ); + #ifdef RANDR extern _X_EXPORT void ScreenRestructured(ScreenPtr pScreen); @@ -403,18 +572,37 @@ typedef struct { extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback; +extern int +XItoCoreType(int xi_type); +extern Bool +DevHasCursor(DeviceIntPtr pDev); extern _X_EXPORT Bool IsPointerDevice(DeviceIntPtr dev); - extern _X_EXPORT Bool IsKeyboardDevice(DeviceIntPtr dev); +extern Bool +IsPointerEvent(InternalEvent *event); +extern Bool +IsTouchEvent(InternalEvent *event); +Bool +IsGestureEvent(InternalEvent *event); +Bool +IsGestureBeginEvent(InternalEvent *event); +Bool +IsGestureEndEvent(InternalEvent *event); extern _X_EXPORT Bool IsMaster(DeviceIntPtr dev); - extern _X_EXPORT Bool IsFloating(DeviceIntPtr dev); +extern _X_HIDDEN void +CopyKeyClass(DeviceIntPtr device, DeviceIntPtr master); +extern _X_HIDDEN int +CorePointerProc(DeviceIntPtr dev, int what); +extern _X_HIDDEN int +CoreKeyboardProc(DeviceIntPtr dev, int what); + extern _X_EXPORT void *lastGLContext; /** diff --git a/mi/midispcur.c b/mi/midispcur.c index 305b6fc68..60f3dd979 100644 --- a/mi/midispcur.c +++ b/mi/midispcur.c @@ -33,7 +33,6 @@ in this Software without prior written authorization from The Open Group. #include -#include "dix/dix_priv.h" #include "dix/gc_priv.h" #include "misc.h" @@ -47,7 +46,9 @@ in this Software without prior written authorization from The Open Group. #include "mipointer.h" #include "misprite.h" #include "gcstruct.h" + #include "picturestr.h" + #include "inputstr.h" /* per-screen private data */ diff --git a/test/bigreq/request-length.c b/test/bigreq/request-length.c index 8174813ae..65cc7ccab 100644 --- a/test/bigreq/request-length.c +++ b/test/bigreq/request-length.c @@ -62,7 +62,8 @@ int main(int argc, char **argv) free(xcb_big_requests_enable_reply(c, xcb_big_requests_enable(c), NULL)); /* Manually write out the bad request. XCB can't help us here.*/ - write(fd, &xise_req, sizeof(xise_req)); + int written = write(fd, &xise_req, sizeof(xise_req)); + (void)written; /* Block until the server has processed our mess and throws an * error. If we get disconnected, then the server has noticed what we're diff --git a/test/simple-xinit.c b/test/simple-xinit.c index 39daf54c9..7340dc6dc 100644 --- a/test/simple-xinit.c +++ b/test/simple-xinit.c @@ -66,7 +66,8 @@ static const char *server_dead = "server_dead"; static void handle_sigchld(int sig) { - write(server_displayfd, server_dead, strlen(server_dead)); + int written = write(server_displayfd, server_dead, strlen(server_dead)); + (void)written; } /* Starts the X server, returning its pid. */ diff --git a/xkb/xkbActions.c b/xkb/xkbActions.c index 8b48255c0..baa2c1749 100644 --- a/xkb/xkbActions.c +++ b/xkb/xkbActions.c @@ -26,7 +26,6 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include -#include #include #include #include @@ -48,6 +47,11 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "mipointer.h" #include "inpututils.h" +#include +#include +#include "mi.h" +#include "mipointer.h" +#include "inpututils.h" #define EXTENSION_EVENT_BASE 64 DevPrivateKeyRec xkbDevicePrivateKeyRec; From 1587be832fe6d7de41d61895916a8d886f371ae3 Mon Sep 17 00:00:00 2001 From: kohnish Date: Fri, 21 Nov 2025 21:21:39 +0100 Subject: [PATCH 40/40] Revert "Xace: unexport Xace functions" This reverts commit 3e0a4ab71203cddabbc1cb14ac11648c0307764f. --- Xext/xace.h | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/Xext/xace.h b/Xext/xace.h index 354724080..c11949ba3 100644 --- a/Xext/xace.h +++ b/Xext/xace.h @@ -55,29 +55,31 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define XACE_KEY_AVAIL 14 #define XACE_NUM_HOOKS 15 -extern CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; +extern _X_EXPORT CallbackListPtr XaceHooks[XACE_NUM_HOOKS]; /* Entry point for hook functions. Called by Xserver. * Required by libdbe and libextmod */ -/* needs to be exported for in-tree modsetting driver, but not part - of public API for external modules */ -_X_EXPORT int XaceHook(int hook, ... /* appropriate args for hook */); +extern _X_EXPORT int XaceHook(int /*hook */ , + ... /*appropriate args for hook */ + ); /* determine whether any callbacks are present for the XACE hook */ -int XaceHookIsSet(int hook); +extern _X_EXPORT int XaceHookIsSet(int hook); /* Special-cased hook functions */ -int XaceHookDispatch0(ClientPtr ptr, int major); +int XaceHookDispatch0(ClientPtr client, int major); #define XaceHookDispatch(c, m) \ ((XaceHooks[XACE_EXT_DISPATCH] && (m) >= EXTENSION_BASE) ? \ XaceHookDispatch0((c), (m)) : \ Success) -int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, PropertyPtr *ppProp, - Mask access_mode); -int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, Mask access_mode); +extern _X_EXPORT int XaceHookPropertyAccess(ClientPtr ptr, WindowPtr pWin, + PropertyPtr *ppProp, + Mask access_mode); +extern _X_EXPORT int XaceHookSelectionAccess(ClientPtr ptr, Selection ** ppSel, + Mask access_mode); /* needs to be exported for in-tree modsetting, but not part of public API */ _X_EXPORT int XaceHookResourceAccess(ClientPtr client, XID id, RESTYPE rtype, void *res, @@ -109,18 +111,18 @@ int XaceHookKeyAvail(xEventPtr ev, DeviceIntPtr dev, int count); /* XTrans wrappers for use by security modules */ -int XaceGetConnectionNumber(ClientPtr ptr); -int XaceIsLocal(ClientPtr ptr); +extern _X_EXPORT int XaceGetConnectionNumber(ClientPtr ptr); +extern _X_EXPORT int XaceIsLocal(ClientPtr ptr); /* From the original Security extension... */ -void XaceCensorImage(ClientPtr client, - RegionPtr pVisibleRegion, - long widthBytesLine, - DrawablePtr pDraw, - int x, int y, int w, int h, - unsigned int format, char *pBuf); +extern _X_EXPORT void XaceCensorImage(ClientPtr client, + RegionPtr pVisibleRegion, + long widthBytesLine, + DrawablePtr pDraw, + int x, int y, int w, int h, + unsigned int format, char *pBuf); #else /* XACE */