mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-15 08:20:21 +01:00
Borrowed working code from Xnest, after debugging and doing cleanups. Still not complete.
This commit is contained in:
parent
dbacc8aa06
commit
353a4cb3bc
6 changed files with 129 additions and 18 deletions
|
|
@ -140,7 +140,7 @@ WindowPtr xscreenTrackWindow(XCBWINDOW w, WindowPtr pParent, int x, int y, int w
|
|||
pWin->optional = (WindowOptPtr)NULL;
|
||||
pWin->cursorIsNone = TRUE;
|
||||
|
||||
pWin->backingStore = NotUseful;file:///home/ori/.mozilla/firefox/eysrj7gz.default/bookmarks.html
|
||||
pWin->backingStore = NotUseful;
|
||||
pWin->DIXsaveUnder = FALSE;
|
||||
pWin->backStorage = (pointer) NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,20 @@
|
|||
bin_PROGRAMS = Xscreen
|
||||
|
||||
Xscreen_SOURCES = xs-init.c \
|
||||
xs-input.c \
|
||||
xs-globals.h \
|
||||
Xscreen_SOURCES = xs-event.c \
|
||||
xs-event.h \
|
||||
xs-gc.c \
|
||||
xs-gcops.c \
|
||||
xs-gcops.h \
|
||||
xs-globals.c \
|
||||
xs-screen.h \
|
||||
xs-globals.h \
|
||||
xs-init.c \
|
||||
xs-input.c \
|
||||
xs-pixmap.c \
|
||||
xs-pixmap.h \
|
||||
xs-screen.c \
|
||||
xs-screen.h \
|
||||
xs-window.c \
|
||||
xs-window.h \
|
||||
$(top_srcdir)/Xext/dpmsstubs.c \
|
||||
$(top_srcdir)/Xi/stubs.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
|
|
|
|||
|
|
@ -1,4 +1,10 @@
|
|||
#include <X11/Xmd.h>
|
||||
#include <X11/XCB/xcb.h>
|
||||
|
||||
#include "xs-globals.h"
|
||||
XCBConnection *xsConnection;
|
||||
XCBDRAWABLE xsDefaultDrawables[MAXDEPTH];
|
||||
XCBDRAWABLE xsDefaultWindow;
|
||||
int xsFontPrivateIndex;
|
||||
int xsGCPrivateIndex;
|
||||
int xsWindowPrivateIndex;
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
#ifndef _XS_GLOBALS_INCL_
|
||||
#define _XS_GLOBALS_INCL_
|
||||
|
||||
#define MAXDEPTH 32
|
||||
|
||||
extern XCBConnection *xsConnection;
|
||||
extern XCBDRAWABLE xsDefaultDrawables[MAXDEPTH];
|
||||
extern XCBDRAWABLE xsDefaultWindow;
|
||||
extern int xsFontPrivateIndex;
|
||||
extern int xsGCPrivateIndex;
|
||||
extern int xsWindowPrivateIndex;
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -81,7 +81,8 @@ void InitOutput(ScreenInfo *si, int argc, char *argv[])
|
|||
* going to be putting in barely-tested code
|
||||
**/
|
||||
si->numScreens = 1;
|
||||
AddScreen(xsOpenScreen, argc, argv);
|
||||
if (AddScreen(xsOpenScreen, argc, argv) < 0)
|
||||
FatalError("Failed to initialize screen 0\n");
|
||||
/*si->numVideoScreens = ... what do I do with this?;*/
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#ifdef HAVE_XSCREEN_CONFIG_H
|
||||
#include <xnest-config.h>
|
||||
#include <xs-config.h>
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
|
|
@ -11,21 +11,104 @@
|
|||
#include <X11/XCB/xcb_aux.h>
|
||||
#include <X11/XCB/xproto.h>
|
||||
#include <X11/XCB/shape.h>
|
||||
|
||||
#include "gcstruct.h"
|
||||
#include "window.h"
|
||||
#include "windowstr.h"
|
||||
#include "pixmapstr.h"
|
||||
#include "colormapst.h"
|
||||
#include "scrnintstr.h"
|
||||
#include "region.h"
|
||||
|
||||
#include "xs-globals.h"
|
||||
#include "xs-screen.h"
|
||||
#include "dix.h"
|
||||
#include "mi.h"
|
||||
#include "mibstore.h"
|
||||
#include "micmap.h"
|
||||
#include "colormapst.h"
|
||||
#include "resource.h"
|
||||
|
||||
#include "mi.h"
|
||||
|
||||
Bool xsOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||
#include "xs-globals.h"
|
||||
#include "xs-types.h"
|
||||
#include "xs-gc.h"
|
||||
#include "xs-font.h"
|
||||
#include "xs-gcops.h"
|
||||
#include "xs-screen.h"
|
||||
#include "xs-window.h"
|
||||
#include "xs-pixmap.h"
|
||||
#include "xs-color.h"
|
||||
|
||||
|
||||
/*sets up screensaver*/
|
||||
static Bool xsSaveScreen(ScreenPtr pScreen, int action)
|
||||
{
|
||||
/* It makes absolutely no sense to support a screensaver
|
||||
* in a rootless nested X server, so I'm just returning FALSE
|
||||
* here. Hopefully this is correct.*/
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the function pointers in pScreen.
|
||||
* Just grouped together here for readability.
|
||||
**/
|
||||
static void xsScreenSetProcs(ScreenPtr pScreen)
|
||||
{
|
||||
/* Random screen procedures */
|
||||
pScreen->QueryBestSize = xsQueryBestSize;
|
||||
pScreen->SaveScreen = xsSaveScreen;
|
||||
pScreen->GetImage = xsGetImage;
|
||||
pScreen->GetSpans = xsGetSpans;
|
||||
pScreen->PointerNonInterestBox = NULL;
|
||||
pScreen->SourceValidate = NULL;
|
||||
|
||||
/* Window Procedures */
|
||||
pScreen->CreateWindow = xsCreateWindow;
|
||||
pScreen->DestroyWindow = xsDestroyWindow;
|
||||
pScreen->PositionWindow = xsPositionWindow;
|
||||
pScreen->ChangeWindowAttributes = xsChangeWindowAttributes;
|
||||
pScreen->RealizeWindow = xsRealizeWindow;
|
||||
pScreen->UnrealizeWindow = xsUnrealizeWindow;
|
||||
pScreen->PostValidateTree = NULL;
|
||||
pScreen->WindowExposures = xsWindowExposures;
|
||||
pScreen->PaintWindowBackground = xsPaintWindowBackground;
|
||||
pScreen->PaintWindowBorder = xsPaintWindowBorder;
|
||||
pScreen->CopyWindow = xsCopyWindow;
|
||||
pScreen->ClipNotify = xsClipNotify;
|
||||
|
||||
/* Backing store procedures */
|
||||
pScreen->SaveDoomedAreas = NULL;
|
||||
pScreen->RestoreAreas = NULL;
|
||||
pScreen->ExposeCopy = NULL;
|
||||
pScreen->TranslateBackingStore = NULL;
|
||||
pScreen->ClearBackingStore = NULL;
|
||||
pScreen->DrawGuarantee = NULL;
|
||||
|
||||
/* Font procedures */
|
||||
pScreen->RealizeFont = xsRealizeFont;
|
||||
pScreen->UnrealizeFont = xsUnrealizeFont;
|
||||
|
||||
/* GC procedures */
|
||||
pScreen->CreateGC = xsCreateGC;
|
||||
|
||||
/* Colormap procedures */
|
||||
pScreen->CreateColormap = xsCreateColormap;
|
||||
pScreen->DestroyColormap = xsDestroyColormap;
|
||||
pScreen->InstallColormap = xsInstallColormap;
|
||||
pScreen->UninstallColormap = xsUninstallColormap;
|
||||
pScreen->ListInstalledColormaps = (ListInstalledColormapsProcPtr) xsListInstalledColormaps;
|
||||
pScreen->StoreColors = (StoreColorsProcPtr) xsStoreColors;
|
||||
pScreen->ResolveColor = xsResolveColor;
|
||||
|
||||
pScreen->BitmapToRegion = xsPixmapToRegion;
|
||||
|
||||
/* OS layer procedures */
|
||||
pScreen->BlockHandler = (ScreenBlockHandlerProcPtr)NoopDDA;
|
||||
pScreen->WakeupHandler = (ScreenWakeupHandlerProcPtr)NoopDDA;
|
||||
pScreen->blockData = NULL;
|
||||
pScreen->wakeupData = NULL;
|
||||
|
||||
#ifdef SHAPE
|
||||
/* overwrite miSetShape with our own */
|
||||
pScreen->SetShape = xsSetShape;
|
||||
#endif /* SHAPE */
|
||||
}
|
||||
|
||||
Bool xsOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[])
|
||||
{
|
||||
xsSetScreenProcs(pScreen);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue