Compare commits

...

8 Commits

Author SHA1 Message Date
stefan11111 d403cbd25c kdrive: ephyr: initialize OS specific callback vectors
These will be used by subsequent commits for generic Kdrive
functions calling back into the OS specific parts

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
stefan11111 a46fd9f16e kdrive: add KdOsInit
Kdrive X servers used to do the OS-speciffic init part using KdOsInit.
This was changed in modern Xorg because Xephyr is the only kdrive
X server there, so there was no need to keep this generic.
Since we want to eventually add Xfbdev, we need to add this back.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
2025-07-04 19:36:04 +02:00
Enrico Weigelt, metux IT consult fc9bd6b175 minor release 25.0.0.4
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:26:48 +02:00
Enrico Weigelt, metux IT consult d338bf6e68 namespace: drop unused winIsRoot()
Not used in this file, so no need to keep it around anymore.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:11:54 +02:00
Enrico Weigelt, metux IT consult c6777fe48e xnest: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 2f46a02217 vfb: drop unused DarwinHandleGUI()
Obsolete since 17 years now, probably just forgotten to clean up.

Fixes: ef1c520537
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:10:02 +02:00
Enrico Weigelt, metux IT consult 93013224b4 xquartz: fix incomplete prototype of executable_path()
> ../hw/xquartz/mach-startup/bundle_trampoline.c:53:29: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
> static char *executable_path() {
>                             ^
>                              void
> 1 warning generated.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:09:33 +02:00
Enrico Weigelt, metux IT consult 74d5b7bb05 xquartz: drop unused field declarations in request handlers
Silence compiler warning on unused fields, eg.:

> ../hw/xquartz/applewm.c:692:5: warning: unused variable 'stuff' [-Wunused-variable]
>     REQUEST(xAppleWMQueryVersionReq);
>     ^
> ../include/dix.h:65:12: note: expanded from macro 'REQUEST'
>     type * stuff = (type *)client->requestBuffer;
>            ^

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
2025-07-04 17:08:46 +02:00
10 changed files with 57 additions and 33 deletions

View File

@ -11,14 +11,6 @@
#include "namespace.h" #include "namespace.h"
#include "hooks.h" #include "hooks.h"
static inline Bool winIsRoot(WindowPtr pWin) {
if (!pWin)
return FALSE;
if (pWin->drawable.pScreen->root == pWin)
return TRUE;
return FALSE;
}
void hookWindowProperty(CallbackListPtr *pcbl, void *unused, void *calldata) void hookWindowProperty(CallbackListPtr *pcbl, void *unused, void *calldata)
{ {
XNS_HOOK_HEAD(PropertyFilterParam); XNS_HOOK_HEAD(PropertyFilterParam);

View File

@ -370,6 +370,23 @@ ddxProcessArgument(int argc, char **argv, int i)
return KdProcessArgument(argc, argv, i); return KdProcessArgument(argc, argv, i);
} }
static int
EphyrInit(void)
{
/*
* make sure at least one screen
* has been added to the system.
*/
if (!KdCardInfoLast()) {
processScreenArg("640x480", NULL);
}
return hostx_init();
}
KdOsFuncs EphyrOsFuncs = {
.Init = EphyrInit,
};
void void
OsVendorInit(void) OsVendorInit(void)
{ {
@ -381,12 +398,7 @@ OsVendorInit(void)
if (hostx_want_host_cursor()) if (hostx_want_host_cursor())
ephyrFuncs.initCursor = &ephyrCursorInit; ephyrFuncs.initCursor = &ephyrCursorInit;
if (serverGeneration == 1) { KdOsInit(&EphyrOsFuncs);
if (!KdCardInfoLast()) {
processScreenArg("640x480", NULL);
}
hostx_init();
}
} }
KdCardFuncs ephyrFuncs = { KdCardFuncs ephyrFuncs = {

View File

@ -91,6 +91,14 @@ const char *kdGlobalXkbLayout = NULL;
const char *kdGlobalXkbVariant = NULL; const char *kdGlobalXkbVariant = NULL;
const char *kdGlobalXkbOptions = NULL; const char *kdGlobalXkbOptions = NULL;
/*
* Carry arguments from InitOutput through driver initialization
* to KdScreenInit
*/
KdOsFuncs *kdOsFuncs = NULL;
void void
KdDisableScreen(ScreenPtr pScreen) KdDisableScreen(ScreenPtr pScreen)
{ {
@ -517,6 +525,19 @@ KdProcessArgument(int argc, char **argv, int i)
return 0; return 0;
} }
void
KdOsInit(KdOsFuncs * pOsFuncs)
{
kdOsFuncs = pOsFuncs;
if (pOsFuncs) {
if (serverGeneration == 1) {
KdDoSwitchCmd("start");
if (pOsFuncs->Init)
(*pOsFuncs->Init) ();
}
}
}
static Bool static Bool
KdAllocatePrivates(ScreenPtr pScreen) KdAllocatePrivates(ScreenPtr pScreen)
{ {

View File

@ -278,6 +278,16 @@ int KdAddConfigKeyboard(char *pointer);
int KdAddKeyboard(KdKeyboardInfo * ki); int KdAddKeyboard(KdKeyboardInfo * ki);
void KdRemoveKeyboard(KdKeyboardInfo * ki); void KdRemoveKeyboard(KdKeyboardInfo * ki);
typedef struct _KdOsFuncs {
int (*Init) (void); /* Only called when the X server is started, when serverGeneration == 1 */
void (*Enable) (void);
Bool (*SpecialKey) (KeySym);
void (*Disable) (void);
void (*Fini) (void);
void (*pollEvents) (void);
void (*Bell) (int, int, int);
} KdOsFuncs;
typedef struct _KdPointerMatrix { typedef struct _KdPointerMatrix {
int matrix[2][3]; int matrix[2][3];
} KdPointerMatrix; } KdPointerMatrix;
@ -289,6 +299,8 @@ extern DevPrivateKeyRec kdScreenPrivateKeyRec;
extern Bool kdEmulateMiddleButton; extern Bool kdEmulateMiddleButton;
extern Bool kdDisableZaphod; extern Bool kdDisableZaphod;
extern KdOsFuncs *kdOsFuncs;
#define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \ #define KdGetScreenPriv(pScreen) ((KdPrivScreenPtr) \
dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey)) dixLookupPrivate(&(pScreen)->devPrivates, kdScreenPrivateKey))
#define KdSetScreenPriv(pScreen,v) \ #define KdSetScreenPriv(pScreen,v) \
@ -345,6 +357,9 @@ void
int int
KdProcessArgument(int argc, char **argv, int i); KdProcessArgument(int argc, char **argv, int i);
void
KdOsInit(KdOsFuncs * pOsFuncs);
void void
KdOsAddInputDrivers(void); KdOsAddInputDrivers(void);

View File

@ -259,13 +259,6 @@ ddxGiveUp(enum ExitCode error)
} }
} }
#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
}
#endif
void void
OsVendorInit(void) OsVendorInit(void)
{ {

View File

@ -154,13 +154,6 @@ ddxGiveUp(enum ExitCode error)
xnestCloseDisplay(); xnestCloseDisplay();
} }
#ifdef __APPLE__
void
DarwinHandleGUI(int argc, char *argv[])
{
}
#endif
void void
OsVendorInit(void) OsVendorInit(void)
{ {

View File

@ -690,7 +690,6 @@ SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to)
static int static int
SProcAppleWMQueryVersion(register ClientPtr client) SProcAppleWMQueryVersion(register ClientPtr client)
{ {
REQUEST(xAppleWMQueryVersionReq);
return ProcAppleWMQueryVersion(client); return ProcAppleWMQueryVersion(client);
} }

View File

@ -50,7 +50,7 @@
* needs and simply execs the startup script which then execs the main binary. * needs and simply execs the startup script which then execs the main binary.
*/ */
static char *executable_path() { static char *executable_path(void) {
uint32_t bufsize = PATH_MAX; uint32_t bufsize = PATH_MAX;
char *buf = calloc(1, bufsize); char *buf = calloc(1, bufsize);

View File

@ -394,7 +394,6 @@ SNotifyEvent(xAppleDRINotifyEvent *from,
static int static int
SProcAppleDRIQueryVersion(register ClientPtr client) SProcAppleDRIQueryVersion(register ClientPtr client)
{ {
REQUEST(xAppleDRIQueryVersionReq);
return ProcAppleDRIQueryVersion(client); return ProcAppleDRIQueryVersion(client);
} }

View File

@ -3,10 +3,10 @@ project('xserver', 'c',
'buildtype=debugoptimized', 'buildtype=debugoptimized',
'c_std=gnu99', 'c_std=gnu99',
], ],
version: '25.0.0.3', version: '25.0.0.4',
meson_version: '>= 0.58.0', meson_version: '>= 0.58.0',
) )
release_date = '2025-07-02' release_date = '2025-07-04'
add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc']) add_project_arguments('-DHAVE_DIX_CONFIG_H', language: ['c', 'objc'])
cc = meson.get_compiler('c') cc = meson.get_compiler('c')