From 6e35c1c8d3b40aa9c4bfd7680b60206ca35c2fe9 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Fri, 16 Feb 2024 17:07:45 +0100 Subject: [PATCH] Xnest: drop hackish Xnest.h Now that Xserver's GC struct has been renamed not to conflict with Xlib anymore, we can drop the ridiculous include hacks and drop Xnest.h Signed-off-by: Enrico Weigelt, metux IT consult --- hw/xnest/Args.c | 2 -- hw/xnest/Color.c | 2 -- hw/xnest/Cursor.c | 2 -- hw/xnest/Display.c | 4 +--- hw/xnest/Display.h | 5 ++++- hw/xnest/Events.c | 2 -- hw/xnest/Font.c | 2 -- hw/xnest/GC.c | 2 -- hw/xnest/GCOps.c | 2 -- hw/xnest/Handlers.c | 2 -- hw/xnest/Init.c | 1 - hw/xnest/Keyboard.c | 2 -- hw/xnest/Pixmap.c | 2 -- hw/xnest/Pointer.c | 2 -- hw/xnest/Screen.c | 2 -- hw/xnest/Visual.c | 2 +- hw/xnest/Window.c | 3 +-- hw/xnest/XNGC.h | 2 +- hw/xnest/Xnest.h | 39 --------------------------------------- 19 files changed, 8 insertions(+), 72 deletions(-) delete mode 100644 hw/xnest/Xnest.h diff --git a/hw/xnest/Args.c b/hw/xnest/Args.c index dbaf3a7e5..18b396383 100644 --- a/hw/xnest/Args.c +++ b/hw/xnest/Args.c @@ -27,8 +27,6 @@ is" without express or implied warranty. #include "servermd.h" #include "extinit.h" -#include "Xnest.h" - #include "Display.h" #include "Args.h" diff --git a/hw/xnest/Color.c b/hw/xnest/Color.c index b4dd5629d..bba5d990d 100644 --- a/hw/xnest/Color.c +++ b/hw/xnest/Color.c @@ -25,8 +25,6 @@ is" without express or implied warranty. #include "colormapst.h" #include "resource.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "Color.h" diff --git a/hw/xnest/Cursor.c b/hw/xnest/Cursor.c index 89f508709..f2d7fed65 100644 --- a/hw/xnest/Cursor.c +++ b/hw/xnest/Cursor.c @@ -25,8 +25,6 @@ is" without express or implied warranty. #include "servermd.h" #include "mipointrst.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "XNCursor.h" diff --git a/hw/xnest/Display.c b/hw/xnest/Display.c index 297d9b9c8..7caf00743 100644 --- a/hw/xnest/Display.c +++ b/hw/xnest/Display.c @@ -28,8 +28,6 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "servermd.h" -#include "Xnest.h" - #include "Display.h" #include "Init.h" #include "Args.h" @@ -52,7 +50,7 @@ Pixel xnestWhitePixel; Drawable xnestDefaultDrawables[MAXDEPTH + 1]; Pixmap xnestIconBitmap; Pixmap xnestScreenSaverPixmap; -XlibGC xnestBitmapGC; +GC xnestBitmapGC; unsigned long xnestEventMask; static int _X_NORETURN diff --git a/hw/xnest/Display.h b/hw/xnest/Display.h index c1fbaebe5..fd2741c94 100644 --- a/hw/xnest/Display.h +++ b/hw/xnest/Display.h @@ -15,6 +15,9 @@ is" without express or implied warranty. #ifndef XNESTCOMMON_H #define XNESTCOMMON_H +#include +#include + #include "colormap.h" #define UNDEFINED -1 @@ -37,7 +40,7 @@ extern Pixel xnestWhitePixel; extern Drawable xnestDefaultDrawables[MAXDEPTH + 1]; extern Pixmap xnestIconBitmap; extern Pixmap xnestScreenSaverPixmap; -extern XlibGC xnestBitmapGC; +extern GC xnestBitmapGC; extern unsigned long xnestEventMask; void xnestOpenDisplay(int argc, char *argv[]); diff --git a/hw/xnest/Events.c b/hw/xnest/Events.c index 0cc0d225d..3f020b95a 100644 --- a/hw/xnest/Events.c +++ b/hw/xnest/Events.c @@ -29,8 +29,6 @@ is" without express or implied warranty. #include "inputstr.h" #include "inpututils.h" -#include "Xnest.h" - #include "Args.h" #include "Color.h" #include "Display.h" diff --git a/hw/xnest/Font.c b/hw/xnest/Font.c index eff88f5d9..95ed6ca13 100644 --- a/hw/xnest/Font.c +++ b/hw/xnest/Font.c @@ -27,8 +27,6 @@ is" without express or implied warranty. #include "dixfontstr.h" #include "scrnintstr.h" -#include "Xnest.h" - #include "Display.h" #include "XNFont.h" diff --git a/hw/xnest/GC.c b/hw/xnest/GC.c index f9f60177f..dcbebb541 100644 --- a/hw/xnest/GC.c +++ b/hw/xnest/GC.c @@ -25,8 +25,6 @@ is" without express or implied warranty. #include "mistruct.h" #include "region.h" -#include "Xnest.h" - #include "Display.h" #include "XNGC.h" #include "GCOps.h" diff --git a/hw/xnest/GCOps.c b/hw/xnest/GCOps.c index 42db50c10..b97ae3350 100644 --- a/hw/xnest/GCOps.c +++ b/hw/xnest/GCOps.c @@ -26,8 +26,6 @@ is" without express or implied warranty. #include "region.h" #include "servermd.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "XNGC.h" diff --git a/hw/xnest/Handlers.c b/hw/xnest/Handlers.c index 1484beec4..3565d4065 100644 --- a/hw/xnest/Handlers.c +++ b/hw/xnest/Handlers.c @@ -22,8 +22,6 @@ is" without express or implied warranty. #include "windowstr.h" #include "servermd.h" -#include "Xnest.h" - #include "Display.h" #include "Events.h" #include "Handlers.h" diff --git a/hw/xnest/Init.c b/hw/xnest/Init.c index 36e801f30..ac00d5353 100644 --- a/hw/xnest/Init.c +++ b/hw/xnest/Init.c @@ -33,7 +33,6 @@ is" without express or implied warranty. #include "servermd.h" #include "dixfontstr.h" #include "extinit_priv.h" -#include "Xnest.h" #include "Display.h" #include "Screen.h" diff --git a/hw/xnest/Keyboard.c b/hw/xnest/Keyboard.c index 212835b07..0850e0ef4 100644 --- a/hw/xnest/Keyboard.c +++ b/hw/xnest/Keyboard.c @@ -28,8 +28,6 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "servermd.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "Keyboard.h" diff --git a/hw/xnest/Pixmap.c b/hw/xnest/Pixmap.c index 3910db3c7..afbcb6568 100644 --- a/hw/xnest/Pixmap.c +++ b/hw/xnest/Pixmap.c @@ -25,8 +25,6 @@ is" without express or implied warranty. #include "privates.h" #include "mi.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "XNPixmap.h" diff --git a/hw/xnest/Pointer.c b/hw/xnest/Pointer.c index 0eced5741..08f7b091c 100644 --- a/hw/xnest/Pointer.c +++ b/hw/xnest/Pointer.c @@ -23,8 +23,6 @@ is" without express or implied warranty. #include "servermd.h" #include "mipointer.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "Pointer.h" diff --git a/hw/xnest/Screen.c b/hw/xnest/Screen.c index bab6096b1..a3ed0afec 100644 --- a/hw/xnest/Screen.c +++ b/hw/xnest/Screen.c @@ -26,8 +26,6 @@ is" without express or implied warranty. #include "colormapst.h" #include "resource.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "XNGC.h" diff --git a/hw/xnest/Visual.c b/hw/xnest/Visual.c index 37a6ac6cf..da23f8cc3 100644 --- a/hw/xnest/Visual.c +++ b/hw/xnest/Visual.c @@ -15,10 +15,10 @@ is" without express or implied warranty. #include #include + #include "scrnintstr.h" #include "dix.h" #include "mi.h" -#include "Xnest.h" #include "Display.h" #include "Visual.h" diff --git a/hw/xnest/Window.c b/hw/xnest/Window.c index d7e388568..df03dec60 100644 --- a/hw/xnest/Window.c +++ b/hw/xnest/Window.c @@ -16,6 +16,7 @@ is" without express or implied warranty. #include #include #include +#include #include "mi/mi_priv.h" @@ -27,8 +28,6 @@ is" without express or implied warranty. #include "scrnintstr.h" #include "region.h" -#include "Xnest.h" - #include "Display.h" #include "Screen.h" #include "XNGC.h" diff --git a/hw/xnest/XNGC.h b/hw/xnest/XNGC.h index a695f7a3b..40710d3f0 100644 --- a/hw/xnest/XNGC.h +++ b/hw/xnest/XNGC.h @@ -23,7 +23,7 @@ is" without express or implied warranty. /* This file uses the GC definition form Xlib.h as XlibGC. */ typedef struct { - XlibGC gc; + GC gc; } xnestPrivGC; extern DevPrivateKeyRec xnestGCPrivateKeyRec; diff --git a/hw/xnest/Xnest.h b/hw/xnest/Xnest.h deleted file mode 100644 index 87c47f471..000000000 --- a/hw/xnest/Xnest.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - -Copyright (c) 1995 X Consortium - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR -OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, -ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of the X Consortium shall -not be used in advertising or otherwise to promote the sale, use or -other dealings in this Software without prior written authorization -from the X Consortium. - -*/ -#ifndef _XORG_XNEST_H -#define _XORG_XNEST_H - -#define GC XlibGC -#include -#include -#include -#undef GC - -#endif /* _XORG_XNEST_H */