2003-11-14 15:54:54 +00:00
|
|
|
/***********************************************************
|
|
|
|
|
|
|
|
|
|
Copyright 1987, 1998 The Open Group
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, distribute, and sell this software and its
|
|
|
|
|
documentation for any purpose is hereby granted without fee, provided that
|
|
|
|
|
the above copyright notice appear in all copies and that both that
|
|
|
|
|
copyright notice and this permission notice appear in supporting
|
|
|
|
|
documentation.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
OPEN GROUP 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 Open Group 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 Open Group.
|
|
|
|
|
|
|
|
|
|
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
|
|
|
|
|
|
|
|
All Rights Reserved
|
|
|
|
|
|
|
|
|
|
Permission to use, copy, modify, and distribute this software and its
|
|
|
|
|
documentation for any purpose and without fee is hereby granted,
|
|
|
|
|
provided that the above copyright notice appear in all copies and that
|
|
|
|
|
both that copyright notice and this permission notice appear in
|
|
|
|
|
supporting documentation, and that the name of Digital not be
|
|
|
|
|
used in advertising or publicity pertaining to distribution of the
|
|
|
|
|
software without specific, written prior permission.
|
|
|
|
|
|
|
|
|
|
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
|
|
|
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
|
|
|
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
|
|
|
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
|
|
|
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
|
|
|
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
|
|
|
SOFTWARE.
|
|
|
|
|
|
|
|
|
|
******************************************************************/
|
|
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
/* The panoramix components contained the following notice */
|
2004-04-23 19:54:30 +00:00
|
|
|
/*****************************************************************
|
|
|
|
|
|
|
|
|
|
Copyright (c) 1991, 1997 Digital Equipment Corporation, Maynard, Massachusetts.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
DIGITAL EQUIPMENT CORPORATION BE LIABLE FOR ANY CLAIM, DAMAGES, INCLUDING,
|
|
|
|
|
BUT NOT LIMITED TO CONSEQUENTIAL OR INCIDENTAL 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 Digital Equipment Corporation
|
|
|
|
|
shall not be used in advertising or otherwise to promote the sale, use or other
|
|
|
|
|
dealings in this Software without prior written authorization from Digital
|
|
|
|
|
Equipment Corporation.
|
|
|
|
|
|
|
|
|
|
******************************************************************/
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2005-07-03 07:02:09 +00:00
|
|
|
#include <dix-config.h>
|
2009-04-08 14:17:39 -07:00
|
|
|
#include <version-config.h>
|
2005-07-03 07:02:09 +00:00
|
|
|
|
2024-02-12 17:43:56 +01:00
|
|
|
#include <pixman.h>
|
2005-04-20 12:25:48 +00:00
|
|
|
#include <X11/X.h>
|
|
|
|
|
#include <X11/Xos.h> /* for unistd.h */
|
|
|
|
|
#include <X11/Xproto.h>
|
2024-02-12 17:43:56 +01:00
|
|
|
#include <X11/fonts/font.h>
|
|
|
|
|
#include <X11/fonts/fontstruct.h>
|
|
|
|
|
#include <X11/fonts/libxfont2.h>
|
2024-02-29 20:24:17 +01:00
|
|
|
|
2024-02-12 19:07:33 +01:00
|
|
|
#include "config/hotplug_priv.h"
|
2025-05-22 17:46:06 +02:00
|
|
|
#include "dix/atom_priv.h"
|
2024-02-29 18:44:33 +01:00
|
|
|
#include "dix/callback_priv.h"
|
2024-02-29 10:20:49 +01:00
|
|
|
#include "dix/cursor_priv.h"
|
2024-03-07 14:50:51 +01:00
|
|
|
#include "dix/dix_priv.h"
|
2024-02-12 17:43:56 +01:00
|
|
|
#include "dix/input_priv.h"
|
2024-03-05 19:55:09 +01:00
|
|
|
#include "dix/gc_priv.h"
|
2024-02-29 20:24:17 +01:00
|
|
|
#include "dix/registry_priv.h"
|
2025-09-23 19:01:12 +02:00
|
|
|
#include "dix/screensaver_priv.h"
|
2024-06-28 01:18:13 +02:00
|
|
|
#include "dix/selection_priv.h"
|
2025-09-23 18:50:21 +02:00
|
|
|
#include "dix/server_priv.h"
|
2025-09-23 19:58:50 +02:00
|
|
|
#include "include/extinit.h"
|
2025-09-23 15:16:05 +02:00
|
|
|
#include "os/audit_priv.h"
|
2024-02-28 19:28:33 +01:00
|
|
|
#include "os/auth.h"
|
2024-02-08 16:03:56 +01:00
|
|
|
#include "os/client_priv.h"
|
2024-02-23 20:52:02 +01:00
|
|
|
#include "os/cmdline.h"
|
2024-02-22 17:32:26 +01:00
|
|
|
#include "os/ddx_priv.h"
|
2024-02-23 17:26:57 +01:00
|
|
|
#include "os/osdep.h"
|
2024-02-27 15:28:25 +01:00
|
|
|
#include "os/screensaver.h"
|
2025-11-12 16:49:24 +01:00
|
|
|
#include "os/serverlock.h"
|
2025-02-25 14:08:51 +01:00
|
|
|
#include "Xext/panoramiXsrv.h"
|
2024-02-29 20:24:17 +01:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
#include "scrnintstr.h"
|
2005-07-03 08:53:54 +00:00
|
|
|
#include "misc.h"
|
|
|
|
|
#include "os.h"
|
2003-11-14 15:54:54 +00:00
|
|
|
#include "windowstr.h"
|
|
|
|
|
#include "resource.h"
|
|
|
|
|
#include "dixstruct.h"
|
|
|
|
|
#include "gcstruct.h"
|
|
|
|
|
#include "extension.h"
|
|
|
|
|
#include "cursorstr.h"
|
|
|
|
|
#include "servermd.h"
|
|
|
|
|
#include "dixfont.h"
|
2003-11-14 16:49:22 +00:00
|
|
|
#include "extnsionst.h"
|
2007-04-04 15:59:51 -04:00
|
|
|
#include "privates.h"
|
2012-05-09 09:21:28 +10:00
|
|
|
#include "exevents.h"
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
#ifdef DPMSExtension
|
2009-07-15 16:51:05 +10:00
|
|
|
#include <X11/extensions/dpmsconst.h>
|
2003-11-14 16:49:22 +00:00
|
|
|
#include "dpmsproc.h"
|
|
|
|
|
#endif
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2005-03-07 23:02:59 +00:00
|
|
|
extern void Dispatch(void);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2016-01-05 15:56:42 -05:00
|
|
|
CallbackListPtr RootWindowFinalizeCallback = NULL;
|
2025-03-13 09:19:34 +01:00
|
|
|
CallbackListPtr PostInitRootWindowCallback = NULL;
|
2016-01-05 15:56:42 -05:00
|
|
|
|
2008-04-26 19:21:05 -07:00
|
|
|
int
|
|
|
|
|
dix_main(int argc, char *argv[], char *envp[])
|
2003-11-14 15:54:54 +00:00
|
|
|
{
|
|
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
display = "0";
|
|
|
|
|
|
2007-05-12 17:41:47 -04:00
|
|
|
InitRegions();
|
2004-04-23 19:54:30 +00:00
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
CheckUserParameters(argc, argv, envp);
|
|
|
|
|
|
|
|
|
|
CheckUserAuthorization();
|
|
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
ProcessCommandLine(argc, argv);
|
|
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
ScreenSaverTime = defaultScreenSaverTime;
|
2003-11-14 15:54:54 +00:00
|
|
|
ScreenSaverInterval = defaultScreenSaverInterval;
|
|
|
|
|
ScreenSaverBlanking = defaultScreenSaverBlanking;
|
|
|
|
|
ScreenSaverAllowExposures = defaultScreenSaverAllowExposures;
|
2017-03-24 12:30:58 -04:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
InitBlockAndWakeupHandlers();
|
|
|
|
|
/* Perform any operating system dependent initializations you'd like */
|
2006-12-06 23:21:15 +02:00
|
|
|
OsInit();
|
2025-11-12 16:11:38 +01:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
CreateWellKnownSockets();
|
2025-07-21 12:22:41 +02:00
|
|
|
for (int i = 1; i < LimitClients; i++)
|
2025-07-16 12:02:01 +02:00
|
|
|
clients[i] = NULL;
|
2024-07-14 11:24:00 -07:00
|
|
|
serverClient = calloc(1, sizeof(ClientRec));
|
2003-11-14 15:54:54 +00:00
|
|
|
if (!serverClient)
|
|
|
|
|
FatalError("couldn't create server client");
|
2013-12-15 01:05:51 -08:00
|
|
|
InitClient(serverClient, 0, (void *) NULL);
|
2025-11-12 16:11:38 +01:00
|
|
|
|
2003-11-25 19:29:01 +00:00
|
|
|
clients[0] = serverClient;
|
|
|
|
|
currentMaxClients = 1;
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2013-12-30 09:15:41 -06:00
|
|
|
/* clear any existing selections */
|
|
|
|
|
InitSelections();
|
|
|
|
|
|
2010-06-30 08:33:55 -07:00
|
|
|
/* Initialize privates before first allocation */
|
|
|
|
|
dixResetPrivates();
|
|
|
|
|
|
2010-04-26 17:22:21 -07:00
|
|
|
/* Initialize server client devPrivates, to be reallocated as
|
|
|
|
|
* more client privates are registered
|
|
|
|
|
*/
|
|
|
|
|
if (!dixAllocatePrivates(&serverClient->devPrivates, PRIVATE_CLIENT))
|
|
|
|
|
FatalError("failed to create server client privates");
|
|
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
if (!InitClientResources(serverClient)) /* for root resources */
|
|
|
|
|
FatalError("couldn't init server resources");
|
|
|
|
|
|
2025-12-14 12:08:18 +02:00
|
|
|
HWEventQueueType alwaysCheckForInput[2] = { 0, 1 };
|
2003-11-14 15:54:54 +00:00
|
|
|
SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]);
|
|
|
|
|
screenInfo.numScreens = 0;
|
|
|
|
|
|
|
|
|
|
InitAtoms();
|
|
|
|
|
InitEvents();
|
2015-09-01 18:50:55 -07:00
|
|
|
xfont2_init_glyph_caching();
|
2007-10-11 14:17:17 -04:00
|
|
|
dixResetRegistry();
|
2015-11-11 22:02:04 -08:00
|
|
|
InitFonts();
|
2003-11-14 15:54:54 +00:00
|
|
|
InitCallbackManager();
|
2025-09-03 16:57:39 +02:00
|
|
|
InitOutput(argc, argv);
|
2005-03-23 19:58:45 +00:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
if (screenInfo.numScreens < 1)
|
|
|
|
|
FatalError("no screens found");
|
2025-05-06 12:48:42 +02:00
|
|
|
LogMessageVerb(X_INFO, 1, "Output(s) initialized\n");
|
|
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
InitExtensions(argc, argv);
|
2025-05-06 12:48:42 +02:00
|
|
|
LogMessageVerb(X_INFO, 1, "Extensions initialized\n");
|
2010-04-26 17:22:21 -07:00
|
|
|
|
2025-08-11 09:53:01 +02:00
|
|
|
DIX_FOR_EACH_GPU_SCREEN({
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!PixmapScreenInit(walkScreen))
|
2022-12-21 22:14:01 -08:00
|
|
|
FatalError("failed to create screen pixmap properties");
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!dixScreenRaiseCreateResources(walkScreen))
|
2013-01-09 12:52:13 +10:00
|
|
|
FatalError("failed to create screen resources");
|
2025-08-11 09:53:01 +02:00
|
|
|
});
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2025-11-23 14:42:29 +02:00
|
|
|
/* Let all screens register the necessary privates */
|
|
|
|
|
|
2025-08-11 09:53:01 +02:00
|
|
|
DIX_FOR_EACH_SCREEN({
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!PixmapScreenInit(walkScreen))
|
2022-12-21 22:14:01 -08:00
|
|
|
FatalError("failed to create screen pixmap properties");
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!dixScreenRaiseCreateResources(walkScreen))
|
2008-05-14 16:02:05 -04:00
|
|
|
FatalError("failed to create screen resources");
|
2025-11-23 14:42:29 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
/* Then use these privates to initialize root windows etc */
|
|
|
|
|
|
|
|
|
|
DIX_FOR_EACH_SCREEN({
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!CreateGCperDepth(walkScreen))
|
2003-11-14 15:54:54 +00:00
|
|
|
FatalError("failed to create scratch GCs");
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!CreateDefaultStipple(walkScreen))
|
2008-05-20 10:20:14 +09:30
|
|
|
FatalError("failed to create default stipple");
|
2025-08-12 18:51:31 +02:00
|
|
|
if (!CreateRootWindow(walkScreen))
|
2003-11-14 15:54:54 +00:00
|
|
|
FatalError("failed to create root window");
|
2025-08-12 18:51:31 +02:00
|
|
|
CallCallbacks(&RootWindowFinalizeCallback, walkScreen);
|
2025-08-11 09:53:01 +02:00
|
|
|
});
|
2006-08-18 18:03:41 +03:00
|
|
|
|
2008-05-14 16:02:05 -04:00
|
|
|
if (SetDefaultFontPath(defaultFontPath) != Success) {
|
2008-05-20 10:20:14 +09:30
|
|
|
ErrorF("[dix] failed to set default font path '%s'",
|
|
|
|
|
defaultFontPath);
|
2012-03-21 12:55:09 -07:00
|
|
|
}
|
2019-10-16 14:21:06 -04:00
|
|
|
if (!SetDefaultFont("fixed")) {
|
|
|
|
|
FatalError("could not open default font");
|
2012-03-21 12:55:09 -07:00
|
|
|
}
|
|
|
|
|
|
2024-05-06 14:57:15 +02:00
|
|
|
if (!(rootCursor = CreateRootCursor())) {
|
2019-10-16 14:21:06 -04:00
|
|
|
FatalError("could not open default cursor font");
|
2006-11-18 19:55:42 +00:00
|
|
|
}
|
2007-07-08 14:31:35 +03:00
|
|
|
|
2024-12-04 15:49:43 +10:00
|
|
|
rootCursor = RefCursor(rootCursor);
|
|
|
|
|
|
2024-01-24 20:04:37 +01:00
|
|
|
#ifdef XINERAMA
|
2003-11-14 16:49:22 +00:00
|
|
|
/*
|
|
|
|
|
* Consolidate window and colourmap information for each screen
|
|
|
|
|
*/
|
|
|
|
|
if (!noPanoramiXExtension)
|
|
|
|
|
PanoramiXConsolidate();
|
2024-01-24 20:04:37 +01:00
|
|
|
#endif /* XINERAMA */
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2025-08-11 09:53:01 +02:00
|
|
|
DIX_FOR_EACH_SCREEN({
|
2025-08-12 18:51:31 +02:00
|
|
|
InitRootWindow(walkScreen->root);
|
|
|
|
|
CallCallbacks(&PostInitRootWindowCallback, walkScreen);
|
2025-08-11 09:53:01 +02:00
|
|
|
});
|
2007-05-01 15:49:41 +09:30
|
|
|
|
2025-05-06 12:48:42 +02:00
|
|
|
LogMessageVerb(X_INFO, 1, "Screen(s) initialized\n");
|
|
|
|
|
|
2007-05-01 15:49:41 +09:30
|
|
|
InitCoreDevices();
|
|
|
|
|
InitInput(argc, argv);
|
2008-11-21 12:39:55 +10:00
|
|
|
InitAndStartDevices();
|
2025-05-06 12:48:42 +02:00
|
|
|
LogMessageVerb(X_INFO, 1, "Input(s) initialized\n");
|
|
|
|
|
|
2010-12-22 16:51:09 +02:00
|
|
|
ReserveClientIds(serverClient);
|
2007-05-01 15:49:41 +09:30
|
|
|
|
2007-11-19 16:55:09 -05:00
|
|
|
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2014-09-10 15:04:00 -07:00
|
|
|
dixCloseRegistry();
|
|
|
|
|
|
2024-01-24 20:04:37 +01:00
|
|
|
#ifdef XINERAMA
|
2003-11-14 16:49:22 +00:00
|
|
|
if (!noPanoramiXExtension) {
|
2006-11-18 19:55:42 +00:00
|
|
|
if (!PanoramiXCreateConnectionBlock()) {
|
2003-11-14 16:49:22 +00:00
|
|
|
FatalError("could not create connection block info");
|
2012-03-21 12:55:09 -07:00
|
|
|
}
|
2006-11-18 19:55:42 +00:00
|
|
|
}
|
2003-11-14 16:49:22 +00:00
|
|
|
else
|
2024-01-24 20:04:37 +01:00
|
|
|
#endif /* XINERAMA */
|
2003-11-14 16:49:22 +00:00
|
|
|
{
|
2006-11-18 19:55:42 +00:00
|
|
|
if (!CreateConnectionBlock()) {
|
2003-11-14 16:49:22 +00:00
|
|
|
FatalError("could not create connection block info");
|
2006-11-18 19:55:42 +00:00
|
|
|
}
|
2003-11-14 16:49:22 +00:00
|
|
|
}
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2007-11-01 15:41:11 -04:00
|
|
|
NotifyParentProcess();
|
2012-03-21 12:55:09 -07:00
|
|
|
|
2015-12-08 11:37:51 -08:00
|
|
|
InputThreadInit();
|
|
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
Dispatch();
|
|
|
|
|
|
2024-12-04 15:49:43 +10:00
|
|
|
UnrefCursor(rootCursor);
|
|
|
|
|
|
2011-05-14 16:11:32 -07:00
|
|
|
UndisplayDevices();
|
2012-05-09 09:21:28 +10:00
|
|
|
DisableAllDevices();
|
2007-04-09 19:31:59 +09:30
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
/* Now free up whatever must be freed */
|
|
|
|
|
if (screenIsSaved == SCREEN_SAVER_ON)
|
2007-11-19 16:55:09 -05:00
|
|
|
dixSaveScreens(serverClient, SCREEN_SAVER_OFF, ScreenSaverReset);
|
2003-11-25 19:29:01 +00:00
|
|
|
FreeScreenSaverTimer();
|
2003-11-14 15:54:54 +00:00
|
|
|
CloseDownExtensions();
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2024-01-24 20:04:37 +01:00
|
|
|
#ifdef XINERAMA
|
2003-11-14 16:49:22 +00:00
|
|
|
{
|
|
|
|
|
Bool remember_it = noPanoramiXExtension;
|
2012-03-21 12:55:09 -07:00
|
|
|
|
2003-11-14 16:49:22 +00:00
|
|
|
noPanoramiXExtension = TRUE;
|
|
|
|
|
FreeAllResources();
|
|
|
|
|
noPanoramiXExtension = remember_it;
|
|
|
|
|
}
|
|
|
|
|
#else
|
2003-11-14 15:54:54 +00:00
|
|
|
FreeAllResources();
|
2024-01-24 20:04:37 +01:00
|
|
|
#endif /* XINERAMA */
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2010-01-15 15:22:02 +10:00
|
|
|
CloseInput();
|
2008-04-24 13:29:46 +09:30
|
|
|
|
2015-12-08 11:37:51 -08:00
|
|
|
InputThreadFini();
|
|
|
|
|
|
2025-08-11 09:53:01 +02:00
|
|
|
DIX_FOR_EACH_SCREEN({ walkScreen->root = NullWindow; });
|
2012-05-09 09:21:28 +10:00
|
|
|
|
2003-11-14 15:54:54 +00:00
|
|
|
CloseDownDevices();
|
2012-05-09 09:21:28 +10:00
|
|
|
|
2008-06-25 13:23:09 +09:30
|
|
|
CloseDownEvents();
|
2008-04-24 13:29:46 +09:30
|
|
|
|
2025-08-15 14:23:35 +02:00
|
|
|
if (screenInfo.numGPUScreens > 0) {
|
|
|
|
|
for (int walkScreenIdx = screenInfo.numGPUScreens - 1; walkScreenIdx >= 0; walkScreenIdx--) {
|
|
|
|
|
ScreenPtr walkScreen = screenInfo.gpuscreens[walkScreenIdx];
|
|
|
|
|
dixFreeScreen(walkScreen);
|
|
|
|
|
screenInfo.numGPUScreens = walkScreenIdx;
|
|
|
|
|
}
|
2012-08-07 17:49:47 -07:00
|
|
|
}
|
2025-08-15 14:25:05 +02:00
|
|
|
memset(&screenInfo.gpuscreens, 0, sizeof(screenInfo.gpuscreens));
|
2012-08-07 17:49:47 -07:00
|
|
|
|
2025-08-15 14:23:35 +02:00
|
|
|
if (screenInfo.numScreens > 0) {
|
|
|
|
|
for (int walkScreenIdx = screenInfo.numScreens - 1; walkScreenIdx >= 0; walkScreenIdx--) {
|
|
|
|
|
ScreenPtr walkScreen = screenInfo.screens[walkScreenIdx];
|
|
|
|
|
dixFreeScreen(walkScreen);
|
|
|
|
|
screenInfo.numScreens = walkScreenIdx;
|
|
|
|
|
}
|
2003-11-14 15:54:54 +00:00
|
|
|
}
|
2025-08-15 14:25:05 +02:00
|
|
|
memset(&screenInfo.screens, 0, sizeof(screenInfo.screens));
|
2010-04-26 17:22:21 -07:00
|
|
|
|
2010-12-22 16:51:09 +02:00
|
|
|
ReleaseClientIds(serverClient);
|
2010-04-26 17:22:21 -07:00
|
|
|
dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT);
|
|
|
|
|
serverClient->devPrivates = NULL;
|
|
|
|
|
|
2012-02-27 18:59:45 +10:00
|
|
|
dixFreeRegistry();
|
|
|
|
|
|
2003-11-25 19:29:01 +00:00
|
|
|
FreeFonts();
|
|
|
|
|
|
2012-02-27 16:43:10 +10:00
|
|
|
FreeAllAtoms();
|
|
|
|
|
|
2003-11-25 19:29:01 +00:00
|
|
|
FreeAuditTimer();
|
2003-11-14 16:49:22 +00:00
|
|
|
|
2012-02-27 18:36:39 +10:00
|
|
|
DeleteCallbackManager();
|
|
|
|
|
|
2018-11-16 14:36:55 -05:00
|
|
|
ClearWorkQueue();
|
|
|
|
|
|
2025-11-12 16:11:38 +01:00
|
|
|
CloseWellKnownConnections();
|
2025-11-12 16:49:24 +01:00
|
|
|
UnlockServer();
|
2003-11-25 19:29:01 +00:00
|
|
|
|
2025-11-12 16:11:38 +01:00
|
|
|
ddxGiveUp(EXIT_NO_ERROR);
|
2003-11-14 15:54:54 +00:00
|
|
|
|
2010-05-06 01:44:06 +07:00
|
|
|
free(ConnectionInfo);
|
2003-11-14 16:49:22 +00:00
|
|
|
ConnectionInfo = NULL;
|
2025-11-12 16:11:38 +01:00
|
|
|
|
2010-06-06 21:18:40 +07:00
|
|
|
return 0;
|
2003-11-14 15:54:54 +00:00
|
|
|
}
|