3
Copyright 1993 by Davor Matic
5
Permission to use, copy, modify, distribute, and sell this software
6
and its documentation for any purpose is hereby granted without fee,
7
provided that the above copyright notice appear in all copies and that
8
both that copyright notice and this permission notice appear in
9
supporting documentation. Davor Matic makes no representations about
10
the suitability of this software for any purpose. It is provided "as
11
is" without express or implied warranty.
15
#ifdef HAVE_XNEST_CONFIG_H
16
#include <xnest-config.h>
20
#include <X11/Xproto.h>
21
#include "screenint.h"
24
#include "scrnintstr.h"
25
#include "windowstr.h"
28
#include <X11/fonts/fontstruct.h>
46
Bool xnestDoFullGeneration = True;
49
InitOutput(ScreenInfo * screen_info, int argc, char *argv[])
53
xnestOpenDisplay(argc, argv);
55
screen_info->imageByteOrder = ImageByteOrder(xnestDisplay);
56
screen_info->bitmapScanlineUnit = BitmapUnit(xnestDisplay);
57
screen_info->bitmapScanlinePad = BitmapPad(xnestDisplay);
58
screen_info->bitmapBitOrder = BitmapBitOrder(xnestDisplay);
60
screen_info->numPixmapFormats = 0;
61
for (i = 0; i < xnestNumPixmapFormats; i++)
62
for (j = 0; j < xnestNumDepths; j++)
63
if ((xnestPixmapFormats[i].depth == 1) ||
64
(xnestPixmapFormats[i].depth == xnestDepths[j])) {
65
screen_info->formats[screen_info->numPixmapFormats].depth =
66
xnestPixmapFormats[i].depth;
67
screen_info->formats[screen_info->numPixmapFormats].bitsPerPixel =
68
xnestPixmapFormats[i].bits_per_pixel;
69
screen_info->formats[screen_info->numPixmapFormats].scanlinePad =
70
xnestPixmapFormats[i].scanline_pad;
71
screen_info->numPixmapFormats++;
75
xnestFontPrivateIndex = AllocateFontPrivateIndex();
80
for (i = 0; i < xnestNumScreens; i++)
81
AddScreen(xnestOpenScreen, argc, argv);
83
xnestNumScreens = screen_info->numScreens;
85
xnestDoFullGeneration = xnestFullGeneration;
89
InitInput(int argc, char *argv[])
93
rc = AllocDevicePair(serverClient, "Xnest",
96
xnestPointerProc, xnestKeyboardProc, FALSE);
99
FatalError("Failed to init Xnest default devices.\n");
103
AddEnabledDevice(XConnectionNumber(xnestDisplay));
105
RegisterBlockAndWakeupHandlers(xnestBlockHandler, xnestWakeupHandler, NULL);
115
* DDX - specific abort routine. Called by AbortServer().
118
AbortDDX(enum ExitCode error)
120
xnestDoFullGeneration = True;
124
/* Called by GiveUp(). */
126
ddxGiveUp(enum ExitCode error)
133
DarwinHandleGUI(int argc, char *argv[])
145
OsVendorFatalError(const char *f, va_list args)
150
#if defined(DDXBEFORERESET)