diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-11-24 19:04:08 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2007-11-24 19:04:08 +0000 |
commit | a2e50908b04b199c1f13f67586b8ce579419d984 (patch) | |
tree | 447c4483cb17bb47c29401aefb1a77e6c90b7497 /xserver/dbe | |
parent | 7f7539c63f6c1d8cc96a016edff945871c68638d (diff) |
merge xserver 1.4, 1st pass
Diffstat (limited to 'xserver/dbe')
-rw-r--r-- | xserver/dbe/Makefile.in | 59 | ||||
-rw-r--r-- | xserver/dbe/dbe.c | 63 |
2 files changed, 67 insertions, 55 deletions
diff --git a/xserver/dbe/Makefile.in b/xserver/dbe/Makefile.in index acd7d6433..b9fd4e6ea 100644 --- a/xserver/dbe/Makefile.in +++ b/xserver/dbe/Makefile.in @@ -103,6 +103,7 @@ AMTAR = @AMTAR@ APPDEFAULTDIR = @APPDEFAULTDIR@ APPGROUP_FALSE = @APPGROUP_FALSE@ APPGROUP_TRUE = @APPGROUP_TRUE@ +APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -122,13 +123,18 @@ BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@ BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@ BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ +BUILD_DARWIN_FALSE = @BUILD_DARWIN_FALSE@ +BUILD_DARWIN_TRUE = @BUILD_DARWIN_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KBD_MODE_FALSE = @BUILD_KBD_MODE_FALSE@ BUILD_KBD_MODE_TRUE = @BUILD_KBD_MODE_TRUE@ +BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ +BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ +BUILD_TIME = @BUILD_TIME@ BUILD_XORGCFG_FALSE = @BUILD_XORGCFG_FALSE@ BUILD_XORGCFG_TRUE = @BUILD_XORGCFG_TRUE@ CC = @CC@ @@ -141,6 +147,10 @@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ COMPOSITE_FALSE = @COMPOSITE_FALSE@ COMPOSITE_TRUE = @COMPOSITE_TRUE@ +CONFIG_DBUS_API_FALSE = @CONFIG_DBUS_API_FALSE@ +CONFIG_DBUS_API_TRUE = @CONFIG_DBUS_API_TRUE@ +CONFIG_HAL_FALSE = @CONFIG_HAL_FALSE@ +CONFIG_HAL_TRUE = @CONFIG_HAL_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CUP_FALSE = @CUP_FALSE@ @@ -150,8 +160,11 @@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ DBE_FALSE = @DBE_FALSE@ DBE_TRUE = @DBE_TRUE@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ DEBUG_FALSE = @DEBUG_FALSE@ DEBUG_TRUE = @DEBUG_TRUE@ DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ @@ -159,7 +172,9 @@ DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ DGA_FALSE = @DGA_FALSE@ +DGA_LIBS = @DGA_LIBS@ DGA_TRUE = @DGA_TRUE@ DIX_CFLAGS = @DIX_CFLAGS@ DLLTOOL = @DLLTOOL@ @@ -186,6 +201,7 @@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ DRI_FALSE = @DRI_FALSE@ DRI_TRUE = @DRI_TRUE@ +DTRACE = @DTRACE@ ECHO = @ECHO@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ @@ -214,6 +230,14 @@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ H3600_TS_FALSE = @H3600_TS_FALSE@ H3600_TS_TRUE = @H3600_TS_TRUE@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_AGL_FRAMEWORK_FALSE = @HAVE_AGL_FRAMEWORK_FALSE@ +HAVE_AGL_FRAMEWORK_TRUE = @HAVE_AGL_FRAMEWORK_TRUE@ +HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ +HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ +HAVE_X_PLUGIN_FALSE = @HAVE_X_PLUGIN_FALSE@ +HAVE_X_PLUGIN_TRUE = @HAVE_X_PLUGIN_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -250,6 +274,7 @@ KDRIVE_HW_FALSE = @KDRIVE_HW_FALSE@ KDRIVE_HW_TRUE = @KDRIVE_HW_TRUE@ KDRIVE_INCS = @KDRIVE_INCS@ KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KDRIVE_TRUE = @KDRIVE_TRUE@ @@ -293,14 +318,17 @@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ MKFONTDIR = @MKFONTDIR@ MKFONTSCALE = @MKFONTSCALE@ -MMX_CAPABLE_FALSE = @MMX_CAPABLE_FALSE@ -MMX_CAPABLE_TRUE = @MMX_CAPABLE_TRUE@ MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ NEED_VSNPRINTF_TRUE = @NEED_VSNPRINTF_TRUE@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ @@ -311,7 +339,11 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ +PLIST_VENDOR_WEB = @PLIST_VENDOR_WEB@ +PLIST_VERSION_STRING = @PLIST_VERSION_STRING@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ @@ -326,6 +358,7 @@ RES_TRUE = @RES_TRUE@ RGB_DB = @RGB_DB@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SERVERCONFIGdir = @SERVERCONFIGdir@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ @@ -349,9 +382,9 @@ USE_CURSES_TRUE = @USE_CURSES_TRUE@ USE_RGB_BUILTIN_FALSE = @USE_RGB_BUILTIN_FALSE@ USE_RGB_BUILTIN_TRUE = @USE_RGB_BUILTIN_TRUE@ VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ +VENDOR_NAME = @VENDOR_NAME@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ -VENDOR_STRING = @VENDOR_STRING@ -VENDOR_STRING_SHORT = @VENDOR_STRING_SHORT@ VERSION = @VERSION@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ @@ -380,13 +413,20 @@ XEPHYR_FALSE = @XEPHYR_FALSE@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XEPHYR_TRUE = @XEPHYR_TRUE@ +XERRORDB_PATH = @XERRORDB_PATH@ XEVIE_FALSE = @XEVIE_FALSE@ XEVIE_TRUE = @XEVIE_TRUE@ XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ XF86BIGFONT_TRUE = @XF86BIGFONT_TRUE@ XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ +XF86MISC_LIBS = @XF86MISC_LIBS@ XF86UTILS_FALSE = @XF86UTILS_FALSE@ XF86UTILS_TRUE = @XF86UTILS_TRUE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XFAKESERVER_FALSE = @XFAKESERVER_FALSE@ +XFAKESERVER_TRUE = @XFAKESERVER_TRUE@ XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ XGLMODULES_LIBS = @XGLMODULES_LIBS@ XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ @@ -400,8 +440,6 @@ XGL_MODULE_PATH = @XGL_MODULE_PATH@ XGL_TRUE = @XGL_TRUE@ XINERAMA_FALSE = @XINERAMA_FALSE@ XINERAMA_TRUE = @XINERAMA_TRUE@ -XINPUT_FALSE = @XINPUT_FALSE@ -XINPUT_TRUE = @XINPUT_TRUE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ @@ -438,8 +476,9 @@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ XORG_LOADER_SPARC_FALSE = @XORG_LOADER_SPARC_FALSE@ XORG_LOADER_SPARC_TRUE = @XORG_LOADER_SPARC_TRUE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ -XORG_OS_KBD = @XORG_OS_KBD@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ XORG_TRUE = @XORG_TRUE@ XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ @@ -450,6 +489,8 @@ XPRINT_LIBS = @XPRINT_LIBS@ XPRINT_TRUE = @XPRINT_TRUE@ XP_USE_FREETYPE_FALSE = @XP_USE_FREETYPE_FALSE@ XP_USE_FREETYPE_TRUE = @XP_USE_FREETYPE_TRUE@ +XQUARTZ_FALSE = @XQUARTZ_FALSE@ +XQUARTZ_TRUE = @XQUARTZ_TRUE@ XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ XSDLSERVER_FALSE = @XSDLSERVER_FALSE@ @@ -460,6 +501,8 @@ XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ +XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ XTRAP_FALSE = @XTRAP_FALSE@ XTRAP_TRUE = @XTRAP_TRUE@ @@ -513,6 +556,8 @@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ diff --git a/xserver/dbe/dbe.c b/xserver/dbe/dbe.c index 66f9328e0..d63620d4f 100644 --- a/xserver/dbe/dbe.c +++ b/xserver/dbe/dbe.c @@ -82,36 +82,6 @@ static Bool firstRegistrationPass = TRUE; /****************************************************************************** * - * DBE DIX Procedure: DbeValidateBuffer - * - * Description: - * - * This function is called from VALIDATE_DRAWABLE_AND_GC and from - * various places in dispatch.c if the server has been compiled with - * the flags -DNEED_DBE_BUF_BITS and -DNEED_DBE_BUF_VALIDATE. - * When pWin->dstBuffer changes, this function will be called with pWin - * as the first argument, the drawable ID that was specified as the - * second argument (could be a back buffer id), and True for the third - * argument. - * When pWin->srcBuffer changes, the third argument will be False, and - * the first two arguments are as described for dstBuffer. - * - * This function should prepare the hardware to access the specified - * buffer for reads (if dstbuf is False) or writes (if dstbuf is True). - * - *****************************************************************************/ - -void -DbeValidateBuffer(WindowPtr pWin, XID drawID, Bool dstbuf) -{ - DbeScreenPrivPtr pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); - if (pDbeScreenPriv->ValidateBuffer) - (*pDbeScreenPriv->ValidateBuffer)(pWin, drawID, dstbuf); -} - - -/****************************************************************************** - * * DBE DIX Procedure: DbeRegisterFunction * * Description: @@ -317,7 +287,6 @@ DbeStubScreen(DbeScreenPrivPtr pDbeScreenPriv, int *nStubbedScreens) pDbeScreenPriv->EndIdiom = NULL; pDbeScreenPriv->WinPrivDelete = NULL; pDbeScreenPriv->ResetProc = NULL; - pDbeScreenPriv->ValidateBuffer = NULL; (*nStubbedScreens)++; @@ -410,11 +379,9 @@ ProcDbeAllocateBackBufferName(ClientPtr client) REQUEST_SIZE_MATCH(xDbeAllocateBackBufferNameReq); /* The window must be valid. */ - if (!(pWin = SecurityLookupWindow(stuff->window, client, - SecurityWriteAccess))) - { - return(BadWindow); - } + status = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess); + if (status != Success) + return status; /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) @@ -638,9 +605,9 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) /* Buffer name must be valid */ if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, SecurityDestroyAccess)) || + stuff->buffer, dbeWindowPrivResType, DixDestroyAccess)) || !(SecurityLookupIDByType(client, stuff->buffer, dbeDrawableResType, - SecurityDestroyAccess))) + DixDestroyAccess))) { client->errorValue = stuff->buffer; return(dbeErrorBase + DbeBadBuffer); @@ -737,11 +704,11 @@ ProcDbeSwapBuffers(ClientPtr client) /* Check all windows to swap. */ /* Each window must be a valid window - BadWindow. */ - if (!(pWin = SecurityLookupWindow(dbeSwapInfo[i].window, client, - SecurityWriteAccess))) - { + error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, + DixWriteAccess); + if (error != Success) { Xfree(swapInfo); - return(BadWindow); + return error; } /* Each window must be double-buffered - BadMatch. */ @@ -875,7 +842,7 @@ ProcDbeGetVisualInfo(ClientPtr client) xDbeGetVisualInfoReply rep; Drawable *drawables; DrawablePtr *pDrawables = NULL; - register int i, j, n; + register int i, j, n, rc; register int count; /* number of visual infos in reply */ register int length; /* length of reply */ ScreenPtr pScreen; @@ -899,11 +866,11 @@ ProcDbeGetVisualInfo(ClientPtr client) for (i = 0; i < stuff->n; i++) { - if (!(pDrawables[i] = (DrawablePtr)SecurityLookupDrawable( - drawables[i], client, SecurityReadAccess))) - { + rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, + DixReadAccess); + if (rc != Success) { Xfree(pDrawables); - return(BadDrawable); + return rc; } } } @@ -1057,7 +1024,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) REQUEST_SIZE_MATCH(xDbeGetBackBufferAttributesReq); if (!(pDbeWindowPriv = (DbeWindowPrivPtr)SecurityLookupIDByType(client, - stuff->buffer, dbeWindowPrivResType, SecurityReadAccess))) + stuff->buffer, dbeWindowPrivResType, DixReadAccess))) { rep.attributes = None; } |