diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-06 19:44:39 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2009-09-06 19:44:39 +0000 |
commit | 9401e5643e90e23287b785e5fc238bb7c7f2d896 (patch) | |
tree | 759a23118c7bb4a1cddc87b3ad5c63f459a64bd2 /xserver/composite | |
parent | 6d29d2deb77299e537a0daf2babf0e217ce51376 (diff) |
update to xserver 1.6.4rc1. Tested by many, ok oga@.
Diffstat (limited to 'xserver/composite')
-rw-r--r-- | xserver/composite/Makefile.am | 1 | ||||
-rw-r--r-- | xserver/composite/Makefile.in | 138 | ||||
-rw-r--r-- | xserver/composite/compalloc.c | 12 | ||||
-rw-r--r-- | xserver/composite/compext.c | 213 | ||||
-rw-r--r-- | xserver/composite/compinit.c | 22 | ||||
-rw-r--r-- | xserver/composite/compint.h | 24 | ||||
-rw-r--r-- | xserver/composite/compoverlay.c | 159 | ||||
-rw-r--r-- | xserver/composite/compwindow.c | 72 |
8 files changed, 293 insertions, 348 deletions
diff --git a/xserver/composite/Makefile.am b/xserver/composite/Makefile.am index 21504e659..d7bead137 100644 --- a/xserver/composite/Makefile.am +++ b/xserver/composite/Makefile.am @@ -7,4 +7,5 @@ libcomposite_la_SOURCES = \ compext.c \ compint.h \ compinit.c \ + compoverlay.c \ compwindow.c diff --git a/xserver/composite/Makefile.in b/xserver/composite/Makefile.in index 99e47b92a..45cb370ff 100644 --- a/xserver/composite/Makefile.in +++ b/xserver/composite/Makefile.in @@ -47,7 +47,6 @@ mkinstalldirs = $(SHELL) $(install_sh) -d CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xorg-server.h \ $(top_builddir)/include/dix-config.h \ - $(top_builddir)/include/xgl-config.h \ $(top_builddir)/include/xorg-config.h \ $(top_builddir)/include/xkb-config.h \ $(top_builddir)/include/xwin-config.h \ @@ -56,16 +55,13 @@ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcomposite_la_LIBADD = am_libcomposite_la_OBJECTS = compalloc.lo compext.lo compinit.lo \ - compwindow.lo + compoverlay.lo compwindow.lo libcomposite_la_OBJECTS = $(am_libcomposite_la_OBJECTS) -DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @@ -77,8 +73,6 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ -AFB_FALSE = @AFB_FALSE@ -AFB_TRUE = @AFB_TRUE@ AGP_FALSE = @AGP_FALSE@ AGP_TRUE = @AGP_TRUE@ AIGLX_FALSE = @AIGLX_FALSE@ @@ -89,10 +83,9 @@ ALPHA_VIDEO_TRUE = @ALPHA_VIDEO_TRUE@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ -APPDEFAULTDIR = @APPDEFAULTDIR@ -APPGROUP_FALSE = @APPGROUP_FALSE@ -APPGROUP_TRUE = @APPGROUP_TRUE@ APPLE_APPLICATIONS_DIR = @APPLE_APPLICATIONS_DIR@ +APPLE_APPLICATION_ID = @APPLE_APPLICATION_ID@ +APPLE_APPLICATION_NAME = @APPLE_APPLICATION_NAME@ APP_MAN_DIR = @APP_MAN_DIR@ APP_MAN_SUFFIX = @APP_MAN_SUFFIX@ AR = @AR@ @@ -106,17 +99,11 @@ AWK = @AWK@ BASE_FONT_PATH = @BASE_FONT_PATH@ BSD_APM_FALSE = @BSD_APM_FALSE@ BSD_APM_TRUE = @BSD_APM_TRUE@ -BSD_KBD_MODE_FALSE = @BSD_KBD_MODE_FALSE@ -BSD_KBD_MODE_TRUE = @BSD_KBD_MODE_TRUE@ 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_DATE = @BUILD_DATE@ -BUILD_IOPORT_FALSE = @BUILD_IOPORT_FALSE@ -BUILD_IOPORT_TRUE = @BUILD_IOPORT_TRUE@ -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@ @@ -124,14 +111,10 @@ 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@ CCAS = @CCAS@ CCASFLAGS = @CCASFLAGS@ CCDEPMODE = @CCDEPMODE@ -CFB_FALSE = @CFB_FALSE@ -CFB_TRUE = @CFB_TRUE@ CFLAGS = @CFLAGS@ COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ COMPOSITE_FALSE = @COMPOSITE_FALSE@ @@ -140,10 +123,10 @@ 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@ +CONFIG_NEED_DBUS_FALSE = @CONFIG_NEED_DBUS_FALSE@ +CONFIG_NEED_DBUS_TRUE = @CONFIG_NEED_DBUS_TRUE@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ -CUP_FALSE = @CUP_FALSE@ -CUP_TRUE = @CUP_TRUE@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ @@ -181,10 +164,13 @@ DMX_BUILD_USB_FALSE = @DMX_BUILD_USB_FALSE@ DMX_BUILD_USB_TRUE = @DMX_BUILD_USB_TRUE@ DMX_FALSE = @DMX_FALSE@ DMX_TRUE = @DMX_TRUE@ +DOLT_BASH = @DOLT_BASH@ DPMSExtension_FALSE = @DPMSExtension_FALSE@ DPMSExtension_TRUE = @DPMSExtension_TRUE@ DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI2_AIGLX_FALSE = @DRI2_AIGLX_FALSE@ +DRI2_AIGLX_TRUE = @DRI2_AIGLX_TRUE@ DRI2_FALSE = @DRI2_FALSE@ DRI2_TRUE = @DRI2_TRUE@ DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ @@ -201,8 +187,6 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ -EVI_FALSE = @EVI_FALSE@ -EVI_TRUE = @EVI_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -210,20 +194,15 @@ FBDEVHW_TRUE = @FBDEVHW_TRUE@ FFLAGS = @FFLAGS@ FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ -FONTCACHE_FALSE = @FONTCACHE_FALSE@ -FONTCACHE_TRUE = @FONTCACHE_TRUE@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ -FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ -FREETYPE_LIBS = @FREETYPE_LIBS@ GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ GLX_DEFINES = @GLX_DEFINES@ GLX_FALSE = @GLX_FALSE@ GLX_TRUE = @GLX_TRUE@ GL_CFLAGS = @GL_CFLAGS@ GL_LIBS = @GL_LIBS@ -H3600_TS_FALSE = @H3600_TS_FALSE@ -H3600_TS_TRUE = @H3600_TS_TRUE@ +GREP = @GREP@ HAL_CFLAGS = @HAL_CFLAGS@ HAL_LIBS = @HAL_LIBS@ HAVE_AGL_FRAMEWORK_FALSE = @HAVE_AGL_FRAMEWORK_FALSE@ @@ -272,9 +251,6 @@ KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ KDRIVE_TRUE = @KDRIVE_TRUE@ -LAUNCHD = @LAUNCHD@ -LAUNCHD_FALSE = @LAUNCHD_FALSE@ -LAUNCHD_TRUE = @LAUNCHD_TRUE@ LDFLAGS = @LDFLAGS@ LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ LEX = @LEX@ @@ -297,6 +273,8 @@ LNXACPI_TRUE = @LNXACPI_TRUE@ LNXAPM_FALSE = @LNXAPM_FALSE@ LNXAPM_TRUE = @LNXAPM_TRUE@ LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ @@ -307,14 +285,10 @@ MAKE_PDF = @MAKE_PDF@ MAKE_PS = @MAKE_PS@ MAKE_TEXT = @MAKE_TEXT@ MESA_SOURCE = @MESA_SOURCE@ -MFB_FALSE = @MFB_FALSE@ -MFB_TRUE = @MFB_TRUE@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MKFONTDIR = @MKFONTDIR@ -MKFONTSCALE = @MKFONTSCALE@ MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ @@ -329,8 +303,6 @@ OBJCFLAGS = @OBJCFLAGS@ OBJCLINK = @OBJCLINK@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ -OPENSSL_CFLAGS = @OPENSSL_CFLAGS@ -OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ @@ -372,24 +344,19 @@ SOLARIS_USL_CONSOLE_FALSE = @SOLARIS_USL_CONSOLE_FALSE@ SOLARIS_USL_CONSOLE_TRUE = @SOLARIS_USL_CONSOLE_TRUE@ SPARC64_VIDEO_FALSE = @SPARC64_VIDEO_FALSE@ SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@ +STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@ +STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@ STRIP = @STRIP@ -SUN_KBD_MODE_FALSE = @SUN_KBD_MODE_FALSE@ -SUN_KBD_MODE_TRUE = @SUN_KBD_MODE_TRUE@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_FALSE = @TSLIB_FALSE@ TSLIB_LIBS = @TSLIB_LIBS@ TSLIB_TRUE = @TSLIB_TRUE@ -USE_CURSES_FALSE = @USE_CURSES_FALSE@ -USE_CURSES_TRUE = @USE_CURSES_TRUE@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_MAN_VERSION = @VENDOR_MAN_VERSION@ VENDOR_NAME = @VENDOR_NAME@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VENDOR_RELEASE = @VENDOR_RELEASE@ VERSION = @VERSION@ -X11APP_ARCHS = @X11APP_ARCHS@ -X11APP_FALSE = @X11APP_FALSE@ -X11APP_TRUE = @X11APP_TRUE@ X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ XACE_FALSE = @XACE_FALSE@ @@ -409,28 +376,14 @@ XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ XDMX_CFLAGS = @XDMX_CFLAGS@ XDMX_LIBS = @XDMX_LIBS@ XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ -XEGLMODULES_CFLAGS = @XEGLMODULES_CFLAGS@ -XEGL_FALSE = @XEGL_FALSE@ -XEGL_LIBS = @XEGL_LIBS@ -XEGL_SYS_LIBS = @XEGL_SYS_LIBS@ -XEGL_TRUE = @XEGL_TRUE@ XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ -XEPHYR_DRI_LIBS = @XEPHYR_DRI_LIBS@ XEPHYR_FALSE = @XEPHYR_FALSE@ -XEPHYR_HAS_DRI_FALSE = @XEPHYR_HAS_DRI_FALSE@ -XEPHYR_HAS_DRI_TRUE = @XEPHYR_HAS_DRI_TRUE@ XEPHYR_INCS = @XEPHYR_INCS@ XEPHYR_LIBS = @XEPHYR_LIBS@ XEPHYR_TRUE = @XEPHYR_TRUE@ -XEVIE_FALSE = @XEVIE_FALSE@ -XEVIE_TRUE = @XEVIE_TRUE@ XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ XF86BIGFONT_TRUE = @XF86BIGFONT_TRUE@ XF86CONFIGFILE = @XF86CONFIGFILE@ -XF86MISC_CFLAGS = @XF86MISC_CFLAGS@ -XF86MISC_FALSE = @XF86MISC_FALSE@ -XF86MISC_LIBS = @XF86MISC_LIBS@ -XF86MISC_TRUE = @XF86MISC_TRUE@ XF86UTILS_FALSE = @XF86UTILS_FALSE@ XF86UTILS_TRUE = @XF86UTILS_TRUE@ XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ @@ -439,19 +392,6 @@ XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ XF86VIDMODE_TRUE = @XF86VIDMODE_TRUE@ XFAKESERVER_FALSE = @XFAKESERVER_FALSE@ XFAKESERVER_TRUE = @XFAKESERVER_TRUE@ -XGLMODULES_CFLAGS = @XGLMODULES_CFLAGS@ -XGLMODULES_LIBS = @XGLMODULES_LIBS@ -XGLXMODULES_CFLAGS = @XGLXMODULES_CFLAGS@ -XGLXMODULES_LIBS = @XGLXMODULES_LIBS@ -XGLX_FALSE = @XGLX_FALSE@ -XGLX_LIBS = @XGLX_LIBS@ -XGLX_SYS_LIBS = @XGLX_SYS_LIBS@ -XGLX_TRUE = @XGLX_TRUE@ -XGL_FALSE = @XGL_FALSE@ -XGL_LIBS = @XGL_LIBS@ -XGL_MODULE_PATH = @XGL_MODULE_PATH@ -XGL_SYS_LIBS = @XGL_SYS_LIBS@ -XGL_TRUE = @XGL_TRUE@ XINERAMA_FALSE = @XINERAMA_FALSE@ XINERAMA_TRUE = @XINERAMA_TRUE@ XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ @@ -466,45 +406,24 @@ XNEST_FALSE = @XNEST_FALSE@ XNEST_LIBS = @XNEST_LIBS@ XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XNEST_TRUE = @XNEST_TRUE@ -XORGCFG_DEP_CFLAGS = @XORGCFG_DEP_CFLAGS@ -XORGCFG_DEP_LIBS = @XORGCFG_DEP_LIBS@ -XORGCONFIG_DEP_CFLAGS = @XORGCONFIG_DEP_CFLAGS@ -XORGCONFIG_DEP_LIBS = @XORGCONFIG_DEP_LIBS@ XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@ XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@ -XORG_BUS_IX86PCI_FALSE = @XORG_BUS_IX86PCI_FALSE@ -XORG_BUS_IX86PCI_TRUE = @XORG_BUS_IX86PCI_TRUE@ XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@ XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@ -XORG_BUS_PPCPCI_FALSE = @XORG_BUS_PPCPCI_FALSE@ -XORG_BUS_PPCPCI_TRUE = @XORG_BUS_PPCPCI_TRUE@ -XORG_BUS_SPARCPCI_FALSE = @XORG_BUS_SPARCPCI_FALSE@ -XORG_BUS_SPARCPCI_TRUE = @XORG_BUS_SPARCPCI_TRUE@ XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@ XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_FALSE = @XORG_FALSE@ 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_SUBDIR = @XORG_OS_SUBDIR@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XORG_TRUE = @XORG_TRUE@ -XPRINTMODULES_CFLAGS = @XPRINTMODULES_CFLAGS@ -XPRINTMODULES_LIBS = @XPRINTMODULES_LIBS@ -XPRINTPROTO_CFLAGS = @XPRINTPROTO_CFLAGS@ -XPRINTPROTO_LIBS = @XPRINTPROTO_LIBS@ -XPRINT_CFLAGS = @XPRINT_CFLAGS@ -XPRINT_FALSE = @XPRINT_FALSE@ -XPRINT_LIBS = @XPRINT_LIBS@ -XPRINT_SYS_LIBS = @XPRINT_SYS_LIBS@ -XPRINT_TRUE = @XPRINT_TRUE@ -XP_USE_FREETYPE_FALSE = @XP_USE_FREETYPE_FALSE@ -XP_USE_FREETYPE_TRUE = @XP_USE_FREETYPE_TRUE@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ XQUARTZ_FALSE = @XQUARTZ_FALSE@ XQUARTZ_TRUE = @XQUARTZ_TRUE@ XREGISTRY_FALSE = @XREGISTRY_FALSE@ @@ -525,8 +444,6 @@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ -XTRAP_FALSE = @XTRAP_FALSE@ -XTRAP_TRUE = @XTRAP_TRUE@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_FALSE = @XVFB_FALSE@ @@ -563,24 +480,16 @@ XWIN_XV_TRUE = @XWIN_XV_TRUE@ X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@ X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@ YACC = @YACC@ +YFLAGS = @YFLAGS@ __XCONFIGFILE__ = @__XCONFIGFILE__@ abi_ansic = @abi_ansic@ abi_extension = @abi_extension@ abi_font = @abi_font@ abi_videodrv = @abi_videodrv@ abi_xinput = @abi_xinput@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_AS = @ac_ct_AS@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ -ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@ ac_ct_F77 = @ac_ct_F77@ -ac_ct_NMEDIT = @ac_ct_NMEDIT@ -ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ -ac_ct_RANLIB = @ac_ct_RANLIB@ -ac_ct_STRIP = @ac_ct_STRIP@ -ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ @@ -599,36 +508,39 @@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ driverdir = @driverdir@ +dvidir = @dvidir@ exec_prefix = @exec_prefix@ extdir = @extdir@ -ft_config = @ft_config@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ +htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ -launchagentsdir = @launchagentsdir@ libdir = @libdir@ libexecdir = @libexecdir@ +localedir = @localedir@ localstatedir = @localstatedir@ logdir = @logdir@ mandir = @mandir@ mkdir_p = @mkdir_p@ moduledir = @moduledir@ oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ +psdir = @psdir@ sbindir = @sbindir@ sdkdir = @sdkdir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -xglmoduledir = @xglmoduledir@ -xpconfigdir = @xpconfigdir@ noinst_LTLIBRARIES = libcomposite.la AM_CFLAGS = $(DIX_CFLAGS) libcomposite_la_SOURCES = \ @@ -636,6 +548,7 @@ libcomposite_la_SOURCES = \ compext.c \ compint.h \ compinit.c \ + compoverlay.c \ compwindow.c all: all-am @@ -692,6 +605,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compinit.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compoverlay.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/compwindow.Plo@am__quote@ .c.o: diff --git a/xserver/composite/compalloc.c b/xserver/composite/compalloc.c index 19c7db0b3..a2f3f140a 100644 --- a/xserver/composite/compalloc.c +++ b/xserver/composite/compalloc.c @@ -148,6 +148,16 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) return BadAlloc; if (ccw->update == CompositeRedirectManual) { + /* If the window was CompositeRedirectAutomatic, then + * unmap the window so that the parent clip list will + * be correctly recomputed. + */ + if (pWin->mapped) + { + DisableMapUnmapEvents (pWin); + UnmapWindow (pWin, FALSE); + EnableMapUnmapEvents (pWin); + } if (cw->damageRegistered) { DamageUnregister (&pWin->drawable, cw->damage); @@ -224,7 +234,7 @@ compFreeClientWindow (WindowPtr pWin, XID id) DamageRegister (&pWin->drawable, cw->damage); cw->damageRegistered = TRUE; pWin->redirectDraw = RedirectDrawAutomatic; - DamageDamageRegion (&pWin->drawable, &pWin->borderSize); + DamageRegionAppend(&pWin->drawable, &pWin->borderSize); } if (wasMapped && !pWin->mapped) { diff --git a/xserver/composite/compext.c b/xserver/composite/compext.c index b3433f72b..4fff20efa 100644 --- a/xserver/composite/compext.c +++ b/xserver/composite/compext.c @@ -51,13 +51,11 @@ #define SERVER_COMPOSITE_MINOR 4 static CARD8 CompositeReqCode; -static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKey; +static int CompositeClientPrivateKeyIndex; +static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKeyIndex; RESTYPE CompositeClientWindowType; RESTYPE CompositeClientSubwindowsType; -static RESTYPE CompositeClientOverlayType; - -static void deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, - ScreenPtr pScreen); +RESTYPE CompositeClientOverlayType; typedef struct _CompositeClient { int major_version; @@ -80,11 +78,6 @@ CompositeClientCallback (CallbackListPtr *list, pCompositeClient->minor_version = 0; } -static void -CompositeResetProc (ExtensionEntry *extEntry) -{ -} - static int FreeCompositeClientWindow (pointer value, XID ccwid) { @@ -107,19 +100,8 @@ static int FreeCompositeClientOverlay (pointer value, XID ccwid) { CompOverlayClientPtr pOc = (CompOverlayClientPtr) value; - ScreenPtr pScreen = pOc->pScreen; - CompScreenPtr cs; - - deleteCompOverlayClient(pOc, pScreen); - - /* Unmap overlay window when there are no more clients using it */ - cs = GetCompScreen(pScreen); - if (cs->pOverlayClients == NULL) { - if (cs->pOverlayWin != NULL) { - UnmapWindow(cs->pOverlayWin, FALSE); - } - } + compFreeOverlayClient (pOc); return Success; } @@ -162,7 +144,7 @@ ProcCompositeRedirectWindow (ClientPtr client) REQUEST(xCompositeRedirectWindowReq); REQUEST_SIZE_MATCH(xCompositeRedirectWindowReq); - rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixSetAttrAccess|DixManageAccess|DixBlendAccess); if (rc != Success) { @@ -180,7 +162,7 @@ ProcCompositeRedirectSubwindows (ClientPtr client) REQUEST(xCompositeRedirectSubwindowsReq); REQUEST_SIZE_MATCH(xCompositeRedirectSubwindowsReq); - rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixSetAttrAccess|DixManageAccess|DixBlendAccess); if (rc != Success) { @@ -232,7 +214,7 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client) REQUEST(xCompositeCreateRegionFromBorderClipReq); REQUEST_SIZE_MATCH(xCompositeCreateRegionFromBorderClipReq); - rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { @@ -268,7 +250,7 @@ ProcCompositeNameWindowPixmap (ClientPtr client) REQUEST(xCompositeNameWindowPixmapReq); REQUEST_SIZE_MATCH(xCompositeNameWindowPixmapReq); - rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { @@ -304,137 +286,6 @@ ProcCompositeNameWindowPixmap (ClientPtr client) } -/* - * Routines for manipulating the per-screen overlay clients list. - * This list indicates which clients have called GetOverlayWindow - * for this screen. - */ - -/* Return the screen's overlay client list element for the given client */ -static CompOverlayClientPtr -findCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen) -{ - CompScreenPtr cs = GetCompScreen(pScreen); - CompOverlayClientPtr pOc; - - for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext) { - if (pOc->pClient == pClient) { - return pOc; - } - } - - return NULL; -} - -static int -createCompOverlayClient (ClientPtr pClient, ScreenPtr pScreen) -{ - CompScreenPtr cs = GetCompScreen(pScreen); - CompOverlayClientPtr pOc; - - pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec)); - if (pOc == NULL) { - return BadAlloc; - } - pOc->pClient = pClient; - pOc->pScreen = pScreen; - pOc->resource = FakeClientID(pClient->index); - pOc->pNext = cs->pOverlayClients; - cs->pOverlayClients = pOc; - - /* - * Create a resource for this element so it can be deleted - * when the client goes away. - */ - if (!AddResource (pOc->resource, CompositeClientOverlayType, - (pointer) pOc)) { - xfree(pOc); - return BadAlloc; - } - - return Success; -} - -/* - * Delete the given overlay client list element from its screen list. - */ -static void -deleteCompOverlayClient (CompOverlayClientPtr pOcToDel, ScreenPtr pScreen) -{ - CompScreenPtr cs = GetCompScreen(pScreen); - CompOverlayClientPtr pOc, pNext; - CompOverlayClientPtr pOcLast = NULL; - - pOc = cs->pOverlayClients; - while (pOc != NULL) { - pNext = pOc->pNext; - if (pOc == pOcToDel) { - xfree(pOc); - if (pOcLast == NULL) { - cs->pOverlayClients = pNext; - } else { - pOcLast->pNext = pNext; - } - break; - } - pOcLast = pOc; - pOc = pNext; - } -} - -/* - * Delete all the hide-counts list elements for this screen. - */ -void -deleteCompOverlayClientsForScreen (ScreenPtr pScreen) -{ - CompScreenPtr cs = GetCompScreen(pScreen); - CompOverlayClientPtr pOc, pTmp; - - pOc = cs->pOverlayClients; - while (pOc != NULL) { - pTmp = pOc->pNext; - FreeResource(pOc->resource, 0); - pOc = pTmp; - } - cs->pOverlayClients = NULL; -} - -/* -** If necessary, create the overlay window. And map it -** Note: I found it excessively difficult to destroy this window -** during compCloseScreen; DeleteWindow can't be called because -** the input devices are already shut down. So we are going to -** just allocate an overlay window once per screen per X server -** invocation. -*/ - -static WindowPtr -createOverlayWindow (ScreenPtr pScreen) -{ - int wid = FakeClientID(0); - WindowPtr pWin; - XID overrideRedirect = TRUE; - int result; - - pWin = CreateWindow ( - wid, WindowTable[pScreen->myNum], - 0, 0, pScreen->width, pScreen->height, 0, - InputOutput, CWOverrideRedirect, &overrideRedirect, - WindowTable[pScreen->myNum]->drawable.depth, - serverClient, pScreen->rootVisual, &result); - if (pWin == NULL) { - return NULL; - } - - if (!AddResource(wid, RT_WINDOW, (pointer)pWin)) { - DeleteWindow(pWin, None); - return NULL; - } - - return pWin; -} - static int ProcCompositeGetOverlayWindow (ClientPtr client) { @@ -447,7 +298,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client) int rc; REQUEST_SIZE_MATCH(xCompositeGetOverlayWindowReq); - rc = dixLookupResource((pointer *)&pWin, stuff->window, RT_WINDOW, client, + rc = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixGetAttrAccess); if (rc != Success) { @@ -456,28 +307,31 @@ ProcCompositeGetOverlayWindow (ClientPtr client) } pScreen = pWin->drawable.pScreen; + /* + * Create an OverlayClient structure to mark this client's + * interest in the overlay window + */ + pOc = compCreateOverlayClient(pScreen, client); + if (pOc == NULL) + return BadAlloc; + + /* + * Make sure the overlay window exists + */ cs = GetCompScreen(pScreen); - if (cs->pOverlayWin == NULL) { - cs->pOverlayWin = createOverlayWindow(pScreen); - if (cs->pOverlayWin == NULL) { + if (cs->pOverlayWin == NULL) + if (!compCreateOverlayWindow(pScreen)) + { + FreeResource (pOc->resource, RT_NONE); return BadAlloc; } - } rc = XaceHook(XACE_RESOURCE_ACCESS, client, cs->pOverlayWin->drawable.id, RT_WINDOW, cs->pOverlayWin, RT_NONE, NULL, DixGetAttrAccess); if (rc != Success) + { + FreeResource (pOc->resource, RT_NONE); return rc; - - MapWindow(cs->pOverlayWin, serverClient); - - /* Record that client is using this overlay window */ - pOc = findCompOverlayClient(client, pScreen); - if (pOc == NULL) { - int ret = createCompOverlayClient(client, pScreen); - if (ret != Success) { - return ret; - } } rep.type = X_Reply; @@ -504,7 +358,6 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client) WindowPtr pWin; ScreenPtr pScreen; CompOverlayClientPtr pOc; - CompScreenPtr cs; REQUEST_SIZE_MATCH(xCompositeReleaseOverlayWindowReq); pWin = (WindowPtr) LookupIDByType (stuff->window, RT_WINDOW); @@ -519,18 +372,12 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client) * Has client queried a reference to the overlay window * on this screen? If not, generate an error. */ - pOc = findCompOverlayClient(client, pWin->drawable.pScreen); - if (pOc == NULL) { + pOc = compFindOverlayClient (pWin->drawable.pScreen, client); + if (pOc == NULL) return BadMatch; - } /* The delete function will free the client structure */ - FreeResource (pOc->resource, 0); - - cs = GetCompScreen(pScreen); - if (cs->pOverlayClients == NULL) { - UnmapWindow(cs->pOverlayWin, FALSE); - } + FreeResource (pOc->resource, RT_NONE); return client->noClientException; } @@ -747,7 +594,7 @@ CompositeExtensionInit (void) extEntry = AddExtension (COMPOSITE_NAME, 0, 0, ProcCompositeDispatch, SProcCompositeDispatch, - CompositeResetProc, StandardMinorOpcode); + NULL, StandardMinorOpcode); if (!extEntry) return; CompositeReqCode = (CARD8) extEntry->base; diff --git a/xserver/composite/compinit.c b/xserver/composite/compinit.c index 3bf77e0ae..b2a9861ea 100644 --- a/xserver/composite/compinit.c +++ b/xserver/composite/compinit.c @@ -46,9 +46,12 @@ #include "compint.h" -DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKey; -DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKey; -DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKey; +static int CompScreenPrivateKeyIndex; +DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKeyIndex; +static int CompWindowPrivateKeyIndex; +DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKeyIndex; +static int CompSubwindowsPrivateKeyIndex; +DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKeyIndex; static Bool @@ -76,14 +79,6 @@ compCloseScreen (int index, ScreenPtr pScreen) pScreen->CopyWindow = cs->CopyWindow; pScreen->PositionWindow = cs->PositionWindow; - deleteCompOverlayClientsForScreen(pScreen); - - /* - ** Note: no need to call DeleteWindow; the server has - ** already destroyed it. - */ - cs->pOverlayWin = NULL; - xfree (cs); dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); ret = (*pScreen->CloseScreen) (index, pScreen); @@ -123,11 +118,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask) pScreen->backingStoreSupport != NotUseful) { if (pWin->backingStore != NotUseful) { compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic); - pWin->backStorage = TRUE; + pWin->backStorage = (pointer) (intptr_t) 1; } else { compUnredirectWindow(serverClient, pWin, CompositeRedirectAutomatic); - pWin->backStorage = FALSE; + pWin->backStorage = NULL; } } @@ -381,6 +376,7 @@ compScreenInit (ScreenPtr pScreen) return FALSE; cs->damaged = FALSE; + cs->overlayWid = FakeClientID(0); cs->pOverlayWin = NULL; cs->pOverlayClients = NULL; diff --git a/xserver/composite/compint.h b/xserver/composite/compint.h index 4b0fe0834..1c19ccd39 100644 --- a/xserver/composite/compint.h +++ b/xserver/composite/compint.h @@ -155,6 +155,7 @@ typedef struct _CompScreen { VisualID *alternateVisuals; WindowPtr pOverlayWin; + Window overlayWid; CompOverlayClientPtr pOverlayClients; } CompScreenRec, *CompScreenPtr; @@ -172,6 +173,7 @@ extern DevPrivateKey CompSubwindowsPrivateKey; extern RESTYPE CompositeClientWindowType; extern RESTYPE CompositeClientSubwindowsType; +extern RESTYPE CompositeClientOverlayType; /* * compalloc.c @@ -230,6 +232,25 @@ Bool compScreenInit (ScreenPtr pScreen); /* + * compoverlay.c + */ + +void +compFreeOverlayClient (CompOverlayClientPtr pOcToDel); + +CompOverlayClientPtr +compFindOverlayClient (ScreenPtr pScreen, ClientPtr pClient); + +CompOverlayClientPtr +compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient); + +Bool +compCreateOverlayWindow (ScreenPtr pScreen); + +void +compDestroyOverlayWindow (ScreenPtr pScreen); + +/* * compwindow.c */ @@ -292,9 +313,6 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); void compWindowUpdate (WindowPtr pWin); -void -deleteCompOverlayClientsForScreen (ScreenPtr pScreen); - WindowPtr CompositeRealChildHead (WindowPtr pWin); diff --git a/xserver/composite/compoverlay.c b/xserver/composite/compoverlay.c new file mode 100644 index 000000000..94e5b0346 --- /dev/null +++ b/xserver/composite/compoverlay.c @@ -0,0 +1,159 @@ +/* + * Copyright © 2006 Sun Microsystems + * + * 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, and that the name of Sun Microsystems not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Sun Microsystems makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * SUN MICROSYSTEMS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL SUN MICROSYSTEMS 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. + * + * Copyright © 2003 Keith Packard + * + * 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, and that the name of Keith Packard not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Keith Packard makes no + * representations about the suitability of this software for any purpose. It + * is provided "as is" without express or implied warranty. + * + * KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL KEITH PACKARD 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. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include "compint.h" +#include "xace.h" + +/* + * Delete the given overlay client list element from its screen list. + */ +void +compFreeOverlayClient (CompOverlayClientPtr pOcToDel) +{ + ScreenPtr pScreen = pOcToDel->pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + CompOverlayClientPtr *pPrev, pOc; + + for (pPrev = &cs->pOverlayClients; (pOc = *pPrev); pPrev = &pOc->pNext) + { + if (pOc == pOcToDel) { + *pPrev = pOc->pNext; + xfree (pOc); + break; + } + } + + /* Destroy overlay window when there are no more clients using it */ + if (cs->pOverlayClients == NULL) + compDestroyOverlayWindow (pScreen); +} + +/* + * Return the client's first overlay client rec from the given screen + */ +CompOverlayClientPtr +compFindOverlayClient (ScreenPtr pScreen, ClientPtr pClient) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + for (pOc = cs->pOverlayClients; pOc != NULL; pOc = pOc->pNext) + if (pOc->pClient == pClient) + return pOc; + + return NULL; +} + +/* + * Create an overlay client object for the given client + */ +CompOverlayClientPtr +compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + CompOverlayClientPtr pOc; + + pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec)); + if (pOc == NULL) + return NULL; + + pOc->pClient = pClient; + pOc->pScreen = pScreen; + pOc->resource = FakeClientID(pClient->index); + pOc->pNext = cs->pOverlayClients; + cs->pOverlayClients = pOc; + + /* + * Create a resource for this element so it can be deleted + * when the client goes away. + */ + if (!AddResource (pOc->resource, CompositeClientOverlayType, (pointer) pOc)) + return NULL; + + return pOc; +} + +/* + * Create the overlay window and map it + */ +Bool +compCreateOverlayWindow (ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pWin; + XID overrideRedirect = TRUE; + int result; + + pWin = cs->pOverlayWin = + CreateWindow (cs->overlayWid, pRoot, + 0, 0, pScreen->width, pScreen->height, 0, + InputOutput, CWOverrideRedirect, &overrideRedirect, + pRoot->drawable.depth, + serverClient, pScreen->rootVisual, &result); + if (pWin == NULL) + return FALSE; + + if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer)pWin)) + return FALSE; + + MapWindow(pWin, serverClient); + + return TRUE; +} + +/* + * Destroy the overlay window + */ +void +compDestroyOverlayWindow (ScreenPtr pScreen) +{ + CompScreenPtr cs = GetCompScreen(pScreen); + + cs->pOverlayWin = NullWindow; + FreeResource (cs->overlayWid, RT_NONE); +} + diff --git a/xserver/composite/compwindow.c b/xserver/composite/compwindow.c index 05dc055c2..577fa733e 100644 --- a/xserver/composite/compwindow.c +++ b/xserver/composite/compwindow.c @@ -54,7 +54,7 @@ compCheckWindow (WindowPtr pWin, pointer data) PixmapPtr pWinPixmap = (*pScreen->GetWindowPixmap) (pWin); PixmapPtr pParentPixmap = pWin->parent ? (*pScreen->GetWindowPixmap) (pWin->parent) : 0; PixmapPtr pScreenPixmap = (*pScreen->GetScreenPixmap) (pScreen); - + if (!pWin->parent) { assert (pWin->redirectDraw == RedirectDrawNone); @@ -122,7 +122,7 @@ compSetPixmapVisitWindow (WindowPtr pWindow, pointer data) SetWinSize (pWindow); SetBorderSize (pWindow); if (HasBorder (pWindow)) - QueueWorkProc (compRepaintBorder, serverClient, + QueueWorkProc (compRepaintBorder, serverClient, (pointer) pWindow->drawable.id); return WT_WALKCHILDREN; } @@ -153,8 +153,8 @@ compCheckRedirect (WindowPtr pWin) if (pWin == cs->pOverlayWin) { should = FALSE; } - } - + } + if (should != (pWin->redirectDraw != RedirectDrawNone)) { if (should) @@ -276,10 +276,10 @@ compClipNotify (WindowPtr pWin, int dx, int dy) ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen (pScreen); CompWindowPtr cw = GetCompWindow (pWin); - + if (cw) { - if (cw->borderClipX != pWin->drawable.x || + if (cw->borderClipX != pWin->drawable.x || cw->borderClipY != pWin->drawable.y) { REGION_TRANSLATE (pScreen, &cw->borderClip, @@ -324,7 +324,7 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent) ScreenPtr pScreen = pWin->drawable.pScreen; XID winVisual = wVisual (pWin); XID parentVisual = wVisual (pParent); - + if (winVisual != parentVisual && (compIsAlternateVisual (pScreen, winVisual) || compIsAlternateVisual (pScreen, parentVisual))) @@ -345,11 +345,11 @@ compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) WindowPtr pParent; int draw_x, draw_y; unsigned int w, h, bw; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + bw = wBorderWidth (pWin); draw_x = pParent->drawable.x + x + (int)bw; draw_y = pParent->drawable.y + y + (int)bw; @@ -390,18 +390,18 @@ compResizeWindow (WindowPtr pWin, int x, int y, WindowPtr pParent; int draw_x, draw_y; unsigned int bw; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + bw = wBorderWidth (pWin); draw_x = pParent->drawable.x + x + (int)bw; draw_y = pParent->drawable.y + y + (int)bw; compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); } compCheckTree (pScreen); - + pScreen->ResizeWindow = cs->ResizeWindow; (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); cs->ResizeWindow = pScreen->ResizeWindow; @@ -430,11 +430,11 @@ compChangeBorderWidth (WindowPtr pWin, unsigned int bw) WindowPtr pParent; int draw_x, draw_y; unsigned int w, h; - + /* if this is a root window, can't be moved */ if (!(pParent = pWin->parent)) return; - + draw_x = pWin->drawable.x; draw_y = pWin->drawable.y; w = pWin->drawable.width; @@ -481,13 +481,13 @@ compReparentWindow (WindowPtr pWin, WindowPtr pPriorParent) */ if (compImplicitRedirect (pWin, pWin->parent)) compRedirectWindow (serverClient, pWin, CompositeRedirectAutomatic); - + /* * Allocate any necessary redirect pixmap * (this actually should never be true; pWin is always unmapped) */ compCheckRedirect (pWin); - + /* * Reset pixmap pointers as appropriate */ @@ -514,7 +514,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); CompWindowPtr cw = GetCompWindow (pWin); - + assert (cw->oldx != COMP_ORIGIN_INVALID); assert (cw->oldy != COMP_ORIGIN_INVALID); if (cw->pOldPixmap) @@ -526,7 +526,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionRec rgnDst; PixmapPtr pPixmap = (*pScreen->GetWindowPixmap) (pWin); GCPtr pGC; - + dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); @@ -535,10 +535,10 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - - REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + + REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); - + dx = dx + pPixmap->screen_x - cw->oldx; dy = dy + pPixmap->screen_y - cw->oldy; pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); @@ -546,7 +546,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { BoxPtr pBox = REGION_RECTS (&rgnDst); int nBox = REGION_NUM_RECTS (&rgnDst); - + ValidateGC(&pPixmap->drawable, pGC); while (nBox--) { @@ -568,7 +568,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) ptOldOrg.x += dx; ptOldOrg.y += dy; } - + pScreen->CopyWindow = cs->CopyWindow; if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { @@ -585,7 +585,7 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) REGION_TRANSLATE (prgnSrc, prgnSrc, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); - DamageDamageRegion (&pWin->drawable, prgnSrc); + DamageRegionAppend(&pWin->drawable, prgnSrc); } cs->CopyWindow = pScreen->CopyWindow; pScreen->CopyWindow = compCopyWindow; @@ -634,7 +634,7 @@ compDestroyWindow (WindowPtr pWin) FreeResource (cw->clients->id, RT_NONE); while ((csw = GetCompSubwindows (pWin))) FreeResource (csw->clients->id, RT_NONE); - + if (pWin->redirectDraw != RedirectDrawNone) compFreePixmap (pWin); ret = (*pScreen->DestroyWindow) (pWin); @@ -664,7 +664,7 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion) /* * Report that as damaged so it will be redrawn */ - DamageDamageRegion (&pWin->drawable, &damage); + DamageRegionAppend(&pWin->drawable, &damage); REGION_UNINIT (pScreen, &damage); /* * Save the new border clip region @@ -699,7 +699,7 @@ PictFormatPtr compWindowFormat (WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; - + return PictureMatchVisual (pScreen, pWin->drawable.depth, compGetWindowVisual (pWin)); } @@ -716,24 +716,24 @@ compWindowUpdateAutomatic (WindowPtr pWin) int error; RegionPtr pRegion = DamageRegion (cw->damage); PicturePtr pSrcPicture = CreatePicture (0, &pSrcPixmap->drawable, - pSrcFormat, + pSrcFormat, 0, 0, serverClient, &error); XID subwindowMode = IncludeInferiors; PicturePtr pDstPicture = CreatePicture (0, &pParent->drawable, pDstFormat, - CPSubwindowMode, + CPSubwindowMode, &subwindowMode, serverClient, &error); - + /* * First move the region from window to screen coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + REGION_TRANSLATE (pScreen, pRegion, pWin->drawable.x, pWin->drawable.y); - + /* * Clip against the "real" border clip */ @@ -742,14 +742,14 @@ compWindowUpdateAutomatic (WindowPtr pWin) /* * Now translate from screen to dest coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + REGION_TRANSLATE (pScreen, pRegion, -pParent->drawable.x, -pParent->drawable.y); - + /* * Clip the picture */ SetPictureClipRegion (pDstPicture, 0, 0, pRegion); - + /* * And paint */ @@ -813,7 +813,7 @@ CompositeRealChildHead (WindowPtr pWin) if (!pChild) { return NullWindow; } - + cs = GetCompScreen(pWin->drawable.pScreen); if (pChild == cs->pOverlayWin) { return pChild; |